Package com.smartgwt.client.data
Class Criteria
java.lang.Object
com.smartgwt.client.core.JsObject
com.smartgwt.client.core.DataClass
com.smartgwt.client.data.Criteria
- All Implemented Interfaces:
HasHandlers
- Direct Known Subclasses:
Criterion
Criteria for selecting only a matching set of records from a DataSource. Criteria can be applied on the client and
server. Unless configured otherwise, criteria will generally be applied client-side by
ResultSet
s via ResultSet.applyFilter
.
Client- and server-side systems built into Smart GWT understand two criteria formats by default: simple key-value
pairs (Criteria) or the AdvancedCriteria
format.
Use DataSource.combineCriteria
to combine two Criteria objects
(including Criteria and AdvancedCriteria) or DataSource.convertCriteria
to convert simple Criteria to the AdvancedCriteria format.
When sent to the Smart GWT
server, the Java representation of the criteria is described here
.
When sent to other servers, the operationBinding.dataProtocol
affects the
format.
-
Field Summary
Fields inherited from class com.smartgwt.client.core.DataClass
factoryCreated, factoryProperties
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCriteria
(Criteria otherCriteria) Adds the criteria from the passed criteria object.void
addCriteria
(String field, Boolean value) void
addCriteria
(String field, Boolean[] value) void
addCriteria
(String field, Double value) void
addCriteria
(String field, Double[] value) void
addCriteria
(String field, Float value) void
addCriteria
(String field, Float[] value) void
addCriteria
(String field, Integer value) void
addCriteria
(String field, Integer[] value) void
addCriteria
(String field, Long value) void
addCriteria
(String field, Long[] value) void
addCriteria
(String field, Object value) void
addCriteria
(String field, String value) void
addCriteria
(String field, String[] value) void
addCriteria
(String field, Date value) Returns an AdvancedCriteria derived from this Criteria object.static Criteria[]
convertToCriteriaArray
(JavaScriptObject nativeArray) static Criteria
getOrCreateRef
(JavaScriptObject jsObj) Return the criteria values as a name-value Map.boolean
Does this represent an underlying AdvancedCriteria object in JavaScript?Methods inherited from class com.smartgwt.client.core.DataClass
applyFactoryProperties, doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated
-
Constructor Details
-
Criteria
public Criteria() -
Criteria
-
Criteria
-
-
Method Details
-
getOrCreateRef
-
addCriteria
-
addCriteria
-
addCriteria
-
addCriteria
-
addCriteria
-
addCriteria
-
addCriteria
-
addCriteria
-
addCriteria
-
addCriteria
-
addCriteria
-
addCriteria
-
addCriteria
-
addCriteria
-
addCriteria
Adds the criteria from the passed criteria object.- Parameters:
otherCriteria
- the passed criteria object
-
getValues
Return the criteria values as a name-value Map.- Returns:
- the criteria values as a Map
-
convertToCriteriaArray
-
isAdvanced
public boolean isAdvanced()Does this represent an underlying AdvancedCriteria object in JavaScript?- Returns:
-
asAdvancedCriteria
Returns an AdvancedCriteria derived from this Criteria object.- Returns:
-