|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.smartgwt.client.core.JsObject
com.smartgwt.client.core.DataClass
com.smartgwt.client.data.Criteria
com.smartgwt.client.data.Criterion
public class Criterion
An object representing a criterion to apply to a record.
A criterion is part of the definition of an AdvancedCriteria object, which is used to filter records according to search criteria.
A
criterion consists of an operator and typically a fieldName from a Record and a value to compare to. However some operators either don't require a value
(eg, isNull) or act on other criteria rather than directly on a Record's fields (eg,
the "and" and "or" logical operators).
| Field Summary |
|---|
| Fields inherited from class com.smartgwt.client.core.JsObject |
|---|
jsObj |
| Constructor Summary | |
|---|---|
Criterion()
|
|
Criterion(Criterion c)
|
|
Criterion(JavaScriptObject jsObj)
|
|
Criterion(OperatorId operator)
|
|
Criterion(OperatorId operator,
Criterion[] criterias)
|
|
Criterion(String fieldName,
OperatorId operator)
|
|
Criterion(String fieldName,
OperatorId operator,
Boolean value)
Constructor for Criterion with fieldName, operator and value. |
|
Criterion(String fieldName,
OperatorId operator,
Boolean[] value)
|
|
Criterion(String fieldName,
OperatorId operator,
Date value)
Constructor for Criterion with fieldName, operator and value. |
|
Criterion(String fieldName,
OperatorId operator,
Date[] value)
|
|
Criterion(String fieldName,
OperatorId operator,
Date start,
Date end)
Constructor for Criterion with fieldName, operator, start and end values. |
|
Criterion(String fieldName,
OperatorId operator,
Float value)
Constructor for Criterion with fieldName, operator and value. |
|
Criterion(String fieldName,
OperatorId operator,
Float[] value)
|
|
Criterion(String fieldName,
OperatorId operator,
Float start,
Float end)
Constructor for Criterion with fieldName, operator, start and end values. |
|
Criterion(String fieldName,
OperatorId operator,
Integer value)
Constructor for Criterion with fieldName, operator and value. |
|
Criterion(String fieldName,
OperatorId operator,
Integer[] value)
|
|
Criterion(String fieldName,
OperatorId operator,
Integer start,
Integer end)
Constructor for Criterion with fieldName, operator, start and end values. |
|
Criterion(String fieldName,
OperatorId operator,
Long value)
Constructor for Criterion with fieldName, operator and value. |
|
Criterion(String fieldName,
OperatorId operator,
Long[] value)
|
|
Criterion(String fieldName,
OperatorId operator,
Long start,
Long end)
Constructor for Criterion with fieldName, operator, start and end values. |
|
Criterion(String fieldName,
OperatorId operator,
String value)
Constructor for Criterion with fieldName, operator and value. |
|
Criterion(String fieldName,
OperatorId operator,
String[] value)
|
|
Criterion(String fieldName,
OperatorId operator,
String start,
String end)
Constructor for Criterion with fieldName, operator, start and end values. |
|
| Method Summary | |
|---|---|
void |
addCriteria(Criterion c)
Adds a new criteria. |
void |
addCriteria(String field,
Boolean value)
|
void |
addCriteria(String field,
Boolean[] value)
|
void |
addCriteria(String field,
Date value)
|
void |
addCriteria(String field,
Date[] 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,
OperatorId op,
Boolean value)
|
void |
addCriteria(String field,
OperatorId op,
Boolean[] value)
|
void |
addCriteria(String field,
OperatorId op,
Date value)
|
void |
addCriteria(String field,
OperatorId op,
Date[] value)
|
void |
addCriteria(String field,
OperatorId op,
Float value)
|
void |
addCriteria(String field,
OperatorId op,
Float[] value)
|
void |
addCriteria(String field,
OperatorId op,
Integer value)
|
void |
addCriteria(String field,
OperatorId op,
Integer[] value)
|
void |
addCriteria(String field,
OperatorId op,
String value)
|
void |
addCriteria(String field,
OperatorId op,
String[] value)
|
void |
addCriteria(String field,
String value)
|
void |
addCriteria(String field,
String[] value)
|
void |
appendToCriterionList(Criterion c)
|
void |
buildCriterionFromList(OperatorId operator,
Criterion[] criterias)
|
Criterion[] |
getCriteria()
Returns an array of sub-criteria for this criterion. |
String |
getFieldName()
Name of the field in each Record that this criterion applies to. |
OperatorId |
getOperator()
Operator this criterion applies. |
static Criterion |
getOrCreateRef(JavaScriptObject jsObj)
|
Boolean |
getValueAsBoolean()
Retrieves the specified value for this criterion. |
Date |
getValueAsDate()
Retrieves the specified value for this criterion. |
Float |
getValueAsFloat()
Retrieves the specified value for this criterion. |
int[] |
getValueAsIntArray()
Retrieves the specified value for this criterion. |
Integer |
getValueAsInteger()
Retrieves the specified value for this criterion. |
String |
getValueAsString()
Retrieves the specified value for this criterion. |
String[] |
getValueAsStringArray()
Retrieves the specified value for this criterion. |
void |
markAdvancedCriteria()
|
void |
setFieldName(String fieldName)
Name of the field in each Record that this criterion applies to. |
void |
setJavaScriptObject(JavaScriptObject jsObj)
|
void |
setOperator(OperatorId operator)
Operator this criterion applies. |
void |
unmarkAdvancedCriteria()
|
| Methods inherited from class com.smartgwt.client.data.Criteria |
|---|
addCriteria, addCriteria, addCriteria, asAdvancedCriteria, convertToCriteriaArray, getValues, isAdvanced |
| Methods inherited from class com.smartgwt.client.core.JsObject |
|---|
isCreated, setJsObj |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Criterion()
public Criterion(JavaScriptObject jsObj)
public Criterion(Criterion c)
public Criterion(OperatorId operator,
Criterion[] criterias)
public Criterion(OperatorId operator)
public Criterion(String fieldName,
OperatorId operator)
public Criterion(String fieldName,
OperatorId operator,
Integer value)
fieldName - the field nameoperator - the operatorvalue - the value
public Criterion(String fieldName,
OperatorId operator,
Integer start,
Integer end)
OperatorId.BETWEEN or OperatorId.BETWEEN_INCLUSIVE
fieldName - the field nameoperator - the operatorstart - the start valueend - the end value
public Criterion(String fieldName,
OperatorId operator,
String value)
fieldName - the field nameoperator - the operatorvalue - the value
public Criterion(String fieldName,
OperatorId operator,
String start,
String end)
OperatorId.BETWEEN or OperatorId.BETWEEN_INCLUSIVE
fieldName - the field nameoperator - the operatorstart - the start valueend - the end value
public Criterion(String fieldName,
OperatorId operator,
Float value)
fieldName - the field nameoperator - the operatorvalue - the value
public Criterion(String fieldName,
OperatorId operator,
Float start,
Float end)
OperatorId.BETWEEN or OperatorId.BETWEEN_INCLUSIVE
fieldName - the field nameoperator - the operatorstart - the start valueend - the end value
public Criterion(String fieldName,
OperatorId operator,
Date value)
fieldName - the field nameoperator - the operatorvalue - the value
public Criterion(String fieldName,
OperatorId operator,
Date start,
Date end)
OperatorId.BETWEEN or OperatorId.BETWEEN_INCLUSIVE
fieldName - the field nameoperator - the operatorstart - the start valueend - the end value
public Criterion(String fieldName,
OperatorId operator,
Boolean value)
fieldName - the field nameoperator - the operatorvalue - the value
public Criterion(String fieldName,
OperatorId operator,
Long value)
fieldName - the field nameoperator - the operatorvalue - the value
public Criterion(String fieldName,
OperatorId operator,
Long start,
Long end)
OperatorId.BETWEEN or OperatorId.BETWEEN_INCLUSIVE
fieldName - the field nameoperator - the operatorstart - the start valueend - the end value
public Criterion(String fieldName,
OperatorId operator,
Integer[] value)
public Criterion(String fieldName,
OperatorId operator,
String[] value)
public Criterion(String fieldName,
OperatorId operator,
Float[] value)
public Criterion(String fieldName,
OperatorId operator,
Long[] value)
public Criterion(String fieldName,
OperatorId operator,
Date[] value)
public Criterion(String fieldName,
OperatorId operator,
Boolean[] value)
| Method Detail |
|---|
public static Criterion getOrCreateRef(JavaScriptObject jsObj)
public void setJavaScriptObject(JavaScriptObject jsObj)
public void setFieldName(String fieldName)
Record that this criterion applies to. Not applicable for a
criterion with sub-criteria. Can be specified as a dataPath to
allow matching nested objects. Use '/' as delimiters for dataPath. See dataPath for more information.
fieldName - . See String. Default value is nullpublic String getFieldName()
Record that this criterion applies to. Not applicable for a
criterion with sub-criteria. Can be specified as a dataPath to
allow matching nested objects. Use '/' as delimiters for dataPath. See dataPath for more information.
Stringpublic void setOperator(OperatorId operator)
operator - operator Default value is nullpublic OperatorId getOperator()
public void addCriteria(Criterion c)
If the present criteria operation is "and", the new criteria is appended to the criteria list.
Otherwise, the present criteria is replaced with an "and" criteria, with two sub-criteria: the present criteria, and the passed criteria.
c - the passed criteria object
public void addCriteria(String field,
String value)
addCriteria in class CriteriaaddCriteria(Criterion)
public void addCriteria(String field,
Integer value)
addCriteria in class Criteria
public void addCriteria(String field,
Float value)
addCriteria in class Criteria
public void addCriteria(String field,
Date value)
addCriteria in class Criteria
public void addCriteria(String field,
Boolean value)
addCriteria in class Criteria
public void addCriteria(String field,
String[] value)
addCriteria in class Criteria
public void addCriteria(String field,
Integer[] value)
addCriteria in class Criteria
public void addCriteria(String field,
Float[] value)
public void addCriteria(String field,
Date[] value)
public void addCriteria(String field,
Boolean[] value)
public void addCriteria(String field,
OperatorId op,
String value)
addCriteria(Criterion)
public void addCriteria(String field,
OperatorId op,
Integer value)
public void addCriteria(String field,
OperatorId op,
Float value)
public void addCriteria(String field,
OperatorId op,
Date value)
public void addCriteria(String field,
OperatorId op,
Boolean value)
public void addCriteria(String field,
OperatorId op,
String[] value)
public void addCriteria(String field,
OperatorId op,
Integer[] value)
public void addCriteria(String field,
OperatorId op,
Float[] value)
public void addCriteria(String field,
OperatorId op,
Date[] value)
public void addCriteria(String field,
OperatorId op,
Boolean[] value)
public void buildCriterionFromList(OperatorId operator,
Criterion[] criterias)
public void appendToCriterionList(Criterion c)
public void markAdvancedCriteria()
public void unmarkAdvancedCriteria()
public Criterion[] getCriteria()
AND or OR.
public String getValueAsString()
#getCriteria(),sub criteria.
public Integer getValueAsInteger()
#getCriteria(),sub criteria.
public Float getValueAsFloat()
#getCriteria(),sub criteria.
public Date getValueAsDate()
#getCriteria(),sub criteria.
public Boolean getValueAsBoolean()
#getCriteria(),sub criteria.
public String[] getValueAsStringArray()
#getCriteria(),sub criteria.
public int[] getValueAsIntArray()
#getCriteria(),sub criteria.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||