Package com.smartgwt.client.data

# Class Criterion

java.lang.Object
com.smartgwt.client.core.JsObject
com.smartgwt.client.core.DataClass
com.smartgwt.client.data.Criteria
com.smartgwt.client.data.Criterion

All Implemented Interfaces:
  `HasHandlers`

Direct Known Subclasses:
  `AdvancedCriteria`

public class Criterion extends Criteria
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). Also, it is possible to specify a `fieldQuery` instead of a `fieldName` and/or a `valueQuery` instead of a `value`

A shortcut form is also allowed where only `fieldName` and `value` values are provided. In this case the `operator` is assumed to be "equals".

See Also:
  - `Advanced Filtering`

- ## Field Summary

  ### Fields inherited from class com.smartgwt.client.core.DataClass

  `factoryCreated, factoryProperties`

  ### Fields inherited from class com.smartgwt.client.core.JsObject

  `jsObj`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Criterion()`
  `Criterion(JavaScriptObject jsObj)`
  `Criterion(AdvancedCriterionSubquery fieldQuery, OperatorId operator)`
  Constructor for Criterion with fieldQuery and operator.
  `Criterion(AdvancedCriterionSubquery fieldQuery, OperatorId operator, AdvancedCriterionSubquery valueQuery)`
  Constructor for Criterion with fieldQuery, operator, and valueQuery.
  `Criterion(AdvancedCriterionSubquery fieldQuery, OperatorId operator, Boolean value)`
  Constructor for Criterion with fieldQuery, operator, and Boolean value.
  `Criterion(AdvancedCriterionSubquery fieldQuery, OperatorId operator, Float value)`
  Constructor for Criterion with fieldQuery, operator, and Float value.
  `Criterion(AdvancedCriterionSubquery fieldQuery, OperatorId operator, Integer value)`
  Constructor for Criterion with fieldQuery, operator, and scalar value.
  `Criterion(AdvancedCriterionSubquery fieldQuery, OperatorId operator, String value)`
  Constructor for Criterion with fieldQuery, operator, and String value.
  `Criterion(AdvancedCriterionSubquery fieldQuery, OperatorId operator, Date value)`
  Constructor for Criterion with fieldQuery, operator, and Date value.
  `Criterion(Criterion c)`
  `Criterion(Criterion[] criterias)`
  `Criterion(OperatorId operator)`
  `Criterion(OperatorId operator, Criterion[] criterias)`
  `Criterion(String fieldName)`
  `Criterion(String fieldName, OperatorId operator)`
  `Criterion(String fieldName, OperatorId operator, AdvancedCriterionSubquery valueQuery)`
  Constructor for Criterion with fieldName, operator, and valueQuery.
  `Criterion(String fieldName, OperatorId operator, RelativeDate value)`
  Constructor for Criterion with fieldName, operator and RelativeDate value.
  `Criterion(String fieldName, OperatorId operator, RelativeDate start, RelativeDate end)`
  Constructor for Criterion with fieldName, operator, start and end RelativeDate values.
  `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, 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.
  `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.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addCriteria(Criteria c)`
  Adds a new criteria.
  `void`
  `addCriteria(Criterion c)`
  Adds a new criteria.
  `void`
  `addCriteria(String field)`
  This method calls `addCriteria(String, OperatorId, value)`, passing "EQUALS" as the OperatorId and Boolean.TRUE as value.
  `void`
  `addCriteria(String field, OperatorId op, Boolean value)`
  This method is similar to `addCriteria(String, OperatorId, String)`.
  `void`
  `addCriteria(String field, OperatorId op, Boolean[] value)`
  This method is similar to `addCriteria(String, OperatorId, String)`.
  `void`
  `addCriteria(String field, OperatorId op, Float value)`
  This method is similar to `addCriteria(String, OperatorId, String)`.
  `void`
  `addCriteria(String field, OperatorId op, Float[] value)`
  This method is similar to `addCriteria(String, OperatorId, String)`.
  `void`
  `addCriteria(String field, OperatorId op, Integer value)`
  This method is similar to `addCriteria(String, OperatorId, String)`.
  `void`
  `addCriteria(String field, OperatorId op, Integer[] value)`
  This method is similar to `addCriteria(String, OperatorId, String)`.
  `void`
  `addCriteria(String field, OperatorId op, String value)`
  Creates a Criterion and calls `addCriteria(Criterion)`.
  `void`
  `addCriteria(String field, OperatorId op, String[] value)`
  This method is similar to `addCriteria(String, OperatorId, String)`.
  `void`
  `addCriteria(String field, OperatorId op, Date value)`
  This method is similar to `addCriteria(String, OperatorId, String)`.
  `void`
  `addCriteria(String field, OperatorId op, Date[] value)`
  This method is similar to `addCriteria(String, OperatorId, String)`.
  `void`
  `addCriteria(String field, Boolean value)`
  This method is similar to `addCriteria(String, String)`.
  `void`
  `addCriteria(String field, Boolean[] value)`
  This method is similar to `addCriteria(String, String)`.
  `void`
  `addCriteria(String field, Float value)`
  This method is similar to `addCriteria(String, String)`.
  `void`
  `addCriteria(String field, Float[] value)`
  This method is similar to `addCriteria(String, String)`.
  `void`
  `addCriteria(String field, Integer value)`
  This method is similar to `addCriteria(String, String)`.
  `void`
  `addCriteria(String field, Integer[] value)`
  This method is similar to `addCriteria(String, String)`.
  `void`
  `addCriteria(String field, String value)`
  This method calls `addCriteria(String, OperatorId, String)`, passing "EQUALS" as the OperatorId.
  `void`
  `addCriteria(String field, String[] value)`
  This method is similar to `addCriteria(String, String)`.
  `void`
  `addCriteria(String field, Date value)`
  This method is similar to `addCriteria(String, String)`.
  `void`
  `addCriteria(String field, Date[] value)`
  This method is similar to `addCriteria(String, String)`.
  `void`
  `appendToCriterionList(Criterion c)`
  For a Criterion that uses `OperatorId.AND` or `OperatorId.OR`, add an additional Criterion to the list of subcriteria to be evaluated.
  `AdvancedCriteria`
  `asAdvancedCriteria()`
  Returns an AdvancedCriteria derived from this Criteria object.
  `void`
  `buildCriterionFromList(OperatorId operator, Criterion[] criterias)`
  `Criterion[]`
  `getCriteria()`
  For a criterion with an operator that acts on other criteria (eg "and", "or"), a list of sub-criteria that are grouped together by the operator.
  `String`
  `getFieldName()`
  Name of the field in each `Record` that this criterion applies to.
  `AdvancedCriterionSubquery`
  `getFieldQuery()`
  A subquery to use instead of a `fieldName`.
  `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.
  `final Integer`
  `getValueAsInt()`
  Synonym of `getValueAsInteger()`.
  `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.
  `String`
  `getValuePath()`
  Wherever `DynamicCriteria` are supported, `valuePath` can be specified as a path in the current `Canvas.ruleScope` as an alternative to setting a fixed `value`.
  `AdvancedCriterionSubquery`
  `getValueQuery()`
  A subquery to use instead of a `value`.
  `static final boolean`
  `instanceOf(Object object)`
  `void`
  `markAdvancedCriteria()`
  `Criterion`
  `setCriteria(Criterion... criteria)`
  For a criterion with an operator that acts on other criteria (eg "and", "or"), a list of sub-criteria that are grouped together by the operator.
  `void`
  `setCustomOperator(String operator)`
  Specifies a "custom" operator to this criterion.
  `Criterion`
  `setFieldName(String fieldName)`
  Name of the field in each `Record` that this criterion applies to.
  `Criterion`
  `setFieldQuery(AdvancedCriterionSubquery fieldQuery)`
  A subquery to use instead of a `fieldName`.
  `Criterion`
  `setOperator(OperatorId operator)`
  Operator this criterion applies.
  `Criterion`
  `setValue(Object value)`
  Sets the value for this criterion.
  `Criterion`
  `setValuePath(String valuePath)`
  Wherever `DynamicCriteria` are supported, `valuePath` can be specified as a path in the current `Canvas.ruleScope` as an alternative to setting a fixed `value`.
  `Criterion`
  `setValueQuery(AdvancedCriterionSubquery valueQuery)`
  A subquery to use instead of a `value`.
  `void`
  `unmarkAdvancedCriteria()`

  ### Methods inherited from class com.smartgwt.client.data.Criteria

  `addCriteria, addCriteria, addCriteria, addCriteria, addCriteria, convertToCriteriaArray, getValues, isAdvanced`

  ### 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`

  ### Methods inherited from class com.smartgwt.client.core.JsObject

  `equals, getJsObj, hashCode, isCreated, setJavaScriptObject, setJsObj`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Criterion

    public Criterion()

  - ### Criterion

    public Criterion(JavaScriptObject jsObj)

  - ### Criterion

    public Criterion(Criterion c)

  - ### Criterion

    public Criterion(Criterion[] criterias)

  - ### Criterion

    public Criterion(OperatorId operator, Criterion[] criterias)

  - ### Criterion

    public Criterion(OperatorId operator)

  - ### Criterion

    public Criterion(String fieldName)

  - ### Criterion

    public Criterion(String fieldName, OperatorId operator)

  - ### Criterion

    public Criterion(String fieldName, OperatorId operator, Integer value)
    Constructor for Criterion with fieldName, operator and value.
    Parameters:
      `fieldName` - the field name
      `operator` - the operator
      `value` - the value

  - ### Criterion

    public Criterion(String fieldName, OperatorId operator, Integer start, Integer end)
    Constructor for Criterion with fieldName, operator, start and end values. This constructor is only valid when the operator is `OperatorId.BETWEEN` or `OperatorId.BETWEEN_INCLUSIVE`
    Parameters:
      `fieldName` - the field name
      `operator` - the operator
      `start` - the start value
      `end` - the end value

  - ### Criterion

    public Criterion(String fieldName, OperatorId operator, String value)
    Constructor for Criterion with fieldName, operator and value.
    Parameters:
      `fieldName` - the field name
      `operator` - the operator
      `value` - the value

  - ### Criterion

    public Criterion(String fieldName, OperatorId operator, String start, String end)
    Constructor for Criterion with fieldName, operator, start and end values. This constructor is only valid when the operator is `OperatorId.BETWEEN` or `OperatorId.BETWEEN_INCLUSIVE`
    Parameters:
      `fieldName` - the field name
      `operator` - the operator
      `start` - the start value
      `end` - the end value

  - ### Criterion

    public Criterion(String fieldName, OperatorId operator, Float value)
    Constructor for Criterion with fieldName, operator and value.
    Parameters:
      `fieldName` - the field name
      `operator` - the operator
      `value` - the value

  - ### Criterion

    public Criterion(String fieldName, OperatorId operator, Float start, Float end)
    Constructor for Criterion with fieldName, operator, start and end values. This constructor is only valid when the operator is `OperatorId.BETWEEN` or `OperatorId.BETWEEN_INCLUSIVE`
    Parameters:
      `fieldName` - the field name
      `operator` - the operator
      `start` - the start value
      `end` - the end value

  - ### Criterion

    public Criterion(String fieldName, OperatorId operator, Date value)
    Constructor for Criterion with fieldName, operator and value.
    Parameters:
      `fieldName` - the field name
      `operator` - the operator
      `value` - the value

  - ### Criterion

    public Criterion(String fieldName, OperatorId operator, Date start, Date end)
    Constructor for Criterion with fieldName, operator, start and end values. This constructor is only valid when the operator is `OperatorId.BETWEEN` or `OperatorId.BETWEEN_INCLUSIVE`
    Parameters:
      `fieldName` - the field name
      `operator` - the operator
      `start` - the start value
      `end` - the end value

  - ### Criterion

    public Criterion(String fieldName, OperatorId operator, RelativeDate value)
    Constructor for Criterion with fieldName, operator and RelativeDate value.
    Parameters:
      `fieldName` - the field name
      `operator` - the operator
      `value` - the RelativeDate value

  - ### Criterion

    public Criterion(String fieldName, OperatorId operator, RelativeDate start, RelativeDate end)
    Constructor for Criterion with fieldName, operator, start and end RelativeDate values. This constructor is only valid when the operator is `OperatorId.BETWEEN` or `OperatorId.BETWEEN_INCLUSIVE`
    Parameters:
      `fieldName` - the field name
      `operator` - the operator
      `start` - the start value
      `end` - the end value

  - ### Criterion

    public Criterion(String fieldName, OperatorId operator, Boolean value)
    Constructor for Criterion with fieldName, operator and value.
    Parameters:
      `fieldName` - the field name
      `operator` - the operator
      `value` - the value

  - ### Criterion

    public Criterion(String fieldName, OperatorId operator, Long value)
    Constructor for Criterion with fieldName, operator and value. Note that JavaScript does not natively have an equivalent format to Java long (fixed point 64 bit). As such the value passed in will be converted to a double value for storage.
    Parameters:
      `fieldName` - the field name
      `operator` - the operator
      `value` - the value

  - ### Criterion

    public Criterion(String fieldName, OperatorId operator, Long start, Long end)
    Constructor for Criterion with fieldName, operator, start and end values. This constructor is only valid when the operator is `OperatorId.BETWEEN` or `OperatorId.BETWEEN_INCLUSIVE`
    Parameters:
      `fieldName` - the field name
      `operator` - the operator
      `start` - the start value
      `end` - the end value

  - ### Criterion

    public Criterion(String fieldName, OperatorId operator, Integer[] value)

  - ### Criterion

    public Criterion(String fieldName, OperatorId operator, String[] value)

  - ### Criterion

    public Criterion(String fieldName, OperatorId operator, Float[] value)

  - ### Criterion

    public Criterion(String fieldName, OperatorId operator, Long[] value)

  - ### Criterion

    public Criterion(String fieldName, OperatorId operator, Date[] value)

  - ### Criterion

    public Criterion(String fieldName, OperatorId operator, Boolean[] value)

  - ### Criterion

    public Criterion(AdvancedCriterionSubquery fieldQuery, OperatorId operator)
    Constructor for Criterion with fieldQuery and operator. Use this for operators like EXISTS or NOT_EXISTS that check for related records.

    Example usage for exists:

         AdvancedCriterionSubquery subquery = new AdvancedCriterionSubquery();
         subquery.setDataSource("orderItem");
         subquery.setCriteria(new AdvancedCriteria(new Criterion("productId", OperatorId.EQUALS, 123)));
         Criterion existsCriterion = new Criterion(subquery, OperatorId.EXISTS);

    Parameters:
      `fieldQuery` - the subquery to use instead of a fieldName
      `operator` - the operator (typically EXISTS, NOT_EXISTS, or comparison operators)

  - ### Criterion

    public Criterion(AdvancedCriterionSubquery fieldQuery, OperatorId operator, Integer value)
    Constructor for Criterion with fieldQuery, operator, and scalar value. Use this when comparing the result of a subquery to a literal value.

    Example: Find orders where the sum of item amounts is greater than 1000

         AdvancedCriterionSubquery subquery = new AdvancedCriterionSubquery();
         subquery.setDataSource("orderItem");
         SummaryFunctionRequest sumAmount = new SummaryFunctionRequest();
         sumAmount.setSummaryFunction(SummaryFunctionType.SUM);
         sumAmount.setField("amount");
         subquery.setSummaryFunctions(new SummaryFunctionRequest[]{sumAmount});
         Criterion criterion = new Criterion(subquery, OperatorId.GREATER_THAN, 1000);

    Parameters:
      `fieldQuery` - the subquery to use instead of a fieldName
      `operator` - the comparison operator
      `value` - the value to compare against

  - ### Criterion

    public Criterion(AdvancedCriterionSubquery fieldQuery, OperatorId operator, String value)
    Constructor for Criterion with fieldQuery, operator, and String value.
    Parameters:
      `fieldQuery` - the subquery to use instead of a fieldName
      `operator` - the comparison operator
      `value` - the value to compare against

  - ### Criterion

    public Criterion(AdvancedCriterionSubquery fieldQuery, OperatorId operator, Float value)
    Constructor for Criterion with fieldQuery, operator, and Float value.
    Parameters:
      `fieldQuery` - the subquery to use instead of a fieldName
      `operator` - the comparison operator
      `value` - the value to compare against

  - ### Criterion

    public Criterion(AdvancedCriterionSubquery fieldQuery, OperatorId operator, Date value)
    Constructor for Criterion with fieldQuery, operator, and Date value.
    Parameters:
      `fieldQuery` - the subquery to use instead of a fieldName
      `operator` - the comparison operator
      `value` - the value to compare against

  - ### Criterion

    public Criterion(AdvancedCriterionSubquery fieldQuery, OperatorId operator, Boolean value)
    Constructor for Criterion with fieldQuery, operator, and Boolean value.
    Parameters:
      `fieldQuery` - the subquery to use instead of a fieldName
      `operator` - the comparison operator
      `value` - the value to compare against

  - ### Criterion

    public Criterion(AdvancedCriterionSubquery fieldQuery, OperatorId operator, AdvancedCriterionSubquery valueQuery)
    Constructor for Criterion with fieldQuery, operator, and valueQuery. Use this when comparing the results of two subqueries.

    Example: Find records where a subquery result equals another subquery result

    Parameters:
      `fieldQuery` - the subquery to use instead of a fieldName
      `operator` - the comparison operator
      `valueQuery` - the subquery to use instead of a literal value

  - ### Criterion

    public Criterion(String fieldName, OperatorId operator, AdvancedCriterionSubquery valueQuery)
    Constructor for Criterion with fieldName, operator, and valueQuery. Use this when comparing a field value to the result of a subquery.

    Example: Find employees where salary is greater than average salary in their department

         AdvancedCriterionSubquery avgSalaryQuery = new AdvancedCriterionSubquery();
         avgSalaryQuery.setDataSource("employee");
         SummaryFunctionRequest avgSalary = new SummaryFunctionRequest();
         avgSalary.setSummaryFunction(SummaryFunctionType.AVG);
         avgSalary.setField("salary");
         avgSalaryQuery.setSummaryFunctions(new SummaryFunctionRequest[]{avgSalary});
         Criterion criterion = new Criterion("salary", OperatorId.GREATER_THAN, avgSalaryQuery);

    Parameters:
      `fieldName` - the field name
      `operator` - the comparison operator
      `valueQuery` - the subquery to use instead of a literal value

- ## Method Details

  - ### getOrCreateRef

    public static Criterion getOrCreateRef(JavaScriptObject jsObj)

  - ### setCriteria

    public Criterion setCriteria(Criterion... criteria)
    For a criterion with an operator that acts on other criteria (eg "and", "or"), a list of sub-criteria that are grouped together by the operator.
    Parameters:
      `criteria` - New criteria value. Default value is null
    Returns:
      `Criterion` instance, for chaining setter calls
    See Also:
      - `Advanced Filtering`

  - ### getCriteria

    public Criterion[] getCriteria()
    For a criterion with an operator that acts on other criteria (eg "and", "or"), a list of sub-criteria that are grouped together by the operator.
    Returns:
      Current criteria value. Default value is null
    See Also:
      - `Advanced Filtering`

  - ### setFieldName

    public Criterion setFieldName(String fieldName)
    Name of the field in each `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.

    #### `fieldQuery` shortcuts

    `fieldName` can also be used to express a compact form of related-field filtering. If you set this property to the qualified name of a field on a related DataSource, it will be transformed into a basic `AdvancedCriterionSubquery`. For example, say you have an `Order` dataSource, which has a `foreign key relation` to your `Customer` dataSource, and your `Customer` dataSource has a "region" field. If you wanted to fetch all Orders for Customers in the EMEA region, you could declare criteria like this:

             {fieldName: "Customer.region", operator: "equals", value: "EMEA"}

    This would be transformed into a subquery filter that would select only the records you want:

          {
               fieldQuery: {
                   dataSource: "Customer",
                   queryOutput: "region"
               }, operator: "equals", value: "EMEA"
          }

    This transformation takes place before the filtering subsystem even sees the criteria, so declaring the shortcut form via `fieldName` leads to exactly the same filtering behavior as if you specified the subquery directly as a `fieldQuery`

    See the `AdvancedCriterionSubquery` overview linked above for more details of the extremely powerful subquery filtering options.

    Parameters:
      `fieldName` - New fieldName value. Default value is null
    Returns:
      `Criterion` instance, for chaining setter calls
    See Also:
      - `Advanced Filtering`

  - ### getFieldName

    public String getFieldName()
    Name of the field in each `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.

    #### `fieldQuery` shortcuts

    `fieldName` can also be used to express a compact form of related-field filtering. If you set this property to the qualified name of a field on a related DataSource, it will be transformed into a basic `AdvancedCriterionSubquery`. For example, say you have an `Order` dataSource, which has a `foreign key relation` to your `Customer` dataSource, and your `Customer` dataSource has a "region" field. If you wanted to fetch all Orders for Customers in the EMEA region, you could declare criteria like this:

             {fieldName: "Customer.region", operator: "equals", value: "EMEA"}

    This would be transformed into a subquery filter that would select only the records you want:

          {
               fieldQuery: {
                   dataSource: "Customer",
                   queryOutput: "region"
               }, operator: "equals", value: "EMEA"
          }

    This transformation takes place before the filtering subsystem even sees the criteria, so declaring the shortcut form via `fieldName` leads to exactly the same filtering behavior as if you specified the subquery directly as a `fieldQuery`

    See the `AdvancedCriterionSubquery` overview linked above for more details of the extremely powerful subquery filtering options.

    Returns:
      Current fieldName value. Default value is null
    See Also:
      - `Advanced Filtering`

  - ### setFieldQuery

    public Criterion setFieldQuery(AdvancedCriterionSubquery fieldQuery)
    A subquery to use instead of a `fieldName`. When you use a `fieldQuery` instead of a `fieldName`, you are comparing the criterion `value` to the result of running a per-record subquery, rather than a field value found directly on the record. Note, it is also possible to specify both a `fieldQuery` and a `valueQuery`.

    See the `subquery overview` for more details of the criteria subquery feature, and examples of use.

    Note, if you specify both `fieldQuery` and `fieldName` in a criterion, we use the `fieldName` and the `fieldQuery` is ignored.

    Note also that `fieldName` supports a special shortcut syntax for declaring a `fieldQuery` as a simple qualified reference to a related field. See the `fieldName` doc linked above for details

    Parameters:
      `fieldQuery` - New fieldQuery value. Default value is null
    Returns:
      `Criterion` instance, for chaining setter calls
    See Also:
      - `Advanced Filtering`

  - ### getFieldQuery

    public AdvancedCriterionSubquery getFieldQuery()
    A subquery to use instead of a `fieldName`. When you use a `fieldQuery` instead of a `fieldName`, you are comparing the criterion `value` to the result of running a per-record subquery, rather than a field value found directly on the record. Note, it is also possible to specify both a `fieldQuery` and a `valueQuery`.

    See the `subquery overview` for more details of the criteria subquery feature, and examples of use.

    Note, if you specify both `fieldQuery` and `fieldName` in a criterion, we use the `fieldName` and the `fieldQuery` is ignored.

    Note also that `fieldName` supports a special shortcut syntax for declaring a `fieldQuery` as a simple qualified reference to a related field. See the `fieldName` doc linked above for details

    Returns:
      Current fieldQuery value. Default value is null
    See Also:
      - `Advanced Filtering`

  - ### setOperator

    public Criterion setOperator(OperatorId operator)
    Operator this criterion applies.
    Parameters:
      `operator` - New operator value. Default value is null
    Returns:
      `Criterion` instance, for chaining setter calls
    See Also:
      - `Advanced Filtering`

  - ### getOperator

    public OperatorId getOperator()
    Operator this criterion applies.
    Returns:
      Current operator value. Default value is null
    See Also:
      - `Advanced Filtering`

  - ### setValuePath

    public Criterion setValuePath(String valuePath)
    Wherever `DynamicCriteria` are supported, `valuePath` can be specified as a path in the current `Canvas.ruleScope` as an alternative to setting a fixed `value`.

    Note: `valuePath` vs setting a path for `fieldName`:

    - use a path for `criterion.fieldName` when criteria will be matched against a nested data structure.
    - use `criterion.valuePath` when the values used in filtering should be dynamically derived based on the `Canvas.ruleScope`. This does not imply that the criteria will be matched against a nested structure.
    Parameters:
      `valuePath` - New valuePath value. Default value is null
    Returns:
      `Criterion` instance, for chaining setter calls

  - ### getValuePath

    public String getValuePath()
    Wherever `DynamicCriteria` are supported, `valuePath` can be specified as a path in the current `Canvas.ruleScope` as an alternative to setting a fixed `value`.

    Note: `valuePath` vs setting a path for `fieldName`:

    - use a path for `criterion.fieldName` when criteria will be matched against a nested data structure.
    - use `criterion.valuePath` when the values used in filtering should be dynamically derived based on the `Canvas.ruleScope`. This does not imply that the criteria will be matched against a nested structure.
    Returns:
      Current valuePath value. Default value is null

  - ### setValueQuery

    public Criterion setValueQuery(AdvancedCriterionSubquery valueQuery)
    A subquery to use instead of a `value`. When you use a `valueQuery` instead of a `value`, you are comparing the values in the record field named in the criterion `fieldName` to the result of running a per-record subquery, rather than a literal scalar value. . Note, it is also possible to specify both a `valueQuery` and a `fieldQuery`.

    See the `subquery overview` for more details of the criteria subquery feature, and examples of use.

    Note, if you specify both `valueQuery` and `value` in a criterion, we use the `value` and the `valueQuery` is ignored

    Parameters:
      `valueQuery` - New valueQuery value. Default value is null
    Returns:
      `Criterion` instance, for chaining setter calls
    See Also:
      - `Advanced Filtering`

  - ### getValueQuery

    public AdvancedCriterionSubquery getValueQuery()
    A subquery to use instead of a `value`. When you use a `valueQuery` instead of a `value`, you are comparing the values in the record field named in the criterion `fieldName` to the result of running a per-record subquery, rather than a literal scalar value. . Note, it is also possible to specify both a `valueQuery` and a `fieldQuery`.

    See the `subquery overview` for more details of the criteria subquery feature, and examples of use.

    Note, if you specify both `valueQuery` and `value` in a criterion, we use the `value` and the `valueQuery` is ignored

    Returns:
      Current valueQuery value. Default value is null
    See Also:
      - `Advanced Filtering`

  - ### instanceOf

    public static final boolean instanceOf(Object object)

  - ### setValue

    public Criterion setValue(Object value)
    Sets the value for this criterion. This is a generic method that accepts any Object type. For type safety, prefer the specific constructors or the generated setter methods.

    Supported value types include: String, Integer, Float, Double, Long, Boolean, Date, and arrays of these types.

    Parameters:
      `value` - the value to set
    Returns:
      this Criterion for chaining

  - ### addCriteria

    public void addCriteria(Criterion c)
    Adds a new criteria.

    If the present criteria operation is "and", the new criteria is appended to the criteria list.

    Otherwise, the existing criteria is replaced with an "and" criteria, with two sub-criteria: the existing criteria, and the passed criteria.

    Note that if the existing criteria was empty (as would happen if new AdvancedCriteria() were called with no arguments), an "and" operator will still be introduced, but the passed criteria will be the only sub-criteria.

    To add an additional Criterion when using the "or" operator, use `appendToCriterionList(com.smartgwt.client.data.Criterion)`.

    Parameters:
      `c` - the passed criteria object

  - ### addCriteria

    public void addCriteria(Criteria c)
    Adds a new criteria. If the passed criteria is a simple Criteria or Criterion, it will turn into AdvancedCriteria, and will be added to the existent criteria.
    Overrides:
      `addCriteria` in class `Criteria`
    Parameters:
      `c` - the passed criteria object

  - ### addCriteria

    public void addCriteria(String field)
    This method calls `addCriteria(String, OperatorId, value)`, passing "EQUALS" as the OperatorId and Boolean.TRUE as value.
    See Also:
      - `addCriteria(Criterion)`

  - ### addCriteria

    public void addCriteria(String field, String value)
    This method calls `addCriteria(String, OperatorId, String)`, passing "EQUALS" as the OperatorId.
    Overrides:
      `addCriteria` in class `Criteria`
    See Also:
      - `addCriteria(Criterion)`

  - ### addCriteria

    public void addCriteria(String field, Integer value)
    This method is similar to `addCriteria(String, String)`.
    Overrides:
      `addCriteria` in class `Criteria`

  - ### addCriteria

    public void addCriteria(String field, Float value)
    This method is similar to `addCriteria(String, String)`.
    Overrides:
      `addCriteria` in class `Criteria`

  - ### addCriteria

    public void addCriteria(String field, Date value)
    This method is similar to `addCriteria(String, String)`.
    Overrides:
      `addCriteria` in class `Criteria`

  - ### addCriteria

    public void addCriteria(String field, Boolean value)
    This method is similar to `addCriteria(String, String)`.
    Overrides:
      `addCriteria` in class `Criteria`

  - ### addCriteria

    public void addCriteria(String field, String[] value)
    This method is similar to `addCriteria(String, String)`.
    Overrides:
      `addCriteria` in class `Criteria`

  - ### addCriteria

    public void addCriteria(String field, Integer[] value)
    This method is similar to `addCriteria(String, String)`.
    Overrides:
      `addCriteria` in class `Criteria`

  - ### addCriteria

    public void addCriteria(String field, Float[] value)
    This method is similar to `addCriteria(String, String)`.
    Overrides:
      `addCriteria` in class `Criteria`

  - ### addCriteria

    public void addCriteria(String field, Date[] value)
    This method is similar to `addCriteria(String, String)`.

  - ### addCriteria

    public void addCriteria(String field, Boolean[] value)
    This method is similar to `addCriteria(String, String)`.
    Overrides:
      `addCriteria` in class `Criteria`

  - ### addCriteria

    public void addCriteria(String field, OperatorId op, String value)
    Creates a Criterion and calls `addCriteria(Criterion)`.

  - ### addCriteria

    public void addCriteria(String field, OperatorId op, Integer value)
    This method is similar to `addCriteria(String, OperatorId, String)`.

  - ### addCriteria

    public void addCriteria(String field, OperatorId op, Float value)
    This method is similar to `addCriteria(String, OperatorId, String)`.

  - ### addCriteria

    public void addCriteria(String field, OperatorId op, Date value)
    This method is similar to `addCriteria(String, OperatorId, String)`.

  - ### addCriteria

    public void addCriteria(String field, OperatorId op, Boolean value)
    This method is similar to `addCriteria(String, OperatorId, String)`.

  - ### addCriteria

    public void addCriteria(String field, OperatorId op, String[] value)
    This method is similar to `addCriteria(String, OperatorId, String)`.

  - ### addCriteria

    public void addCriteria(String field, OperatorId op, Integer[] value)
    This method is similar to `addCriteria(String, OperatorId, String)`.

  - ### addCriteria

    public void addCriteria(String field, OperatorId op, Float[] value)
    This method is similar to `addCriteria(String, OperatorId, String)`.

  - ### addCriteria

    public void addCriteria(String field, OperatorId op, Date[] value)
    This method is similar to `addCriteria(String, OperatorId, String)`.

  - ### addCriteria

    public void addCriteria(String field, OperatorId op, Boolean[] value)
    This method is similar to `addCriteria(String, OperatorId, String)`.

  - ### buildCriterionFromList

    public void buildCriterionFromList(OperatorId operator, Criterion[] criterias)

  - ### appendToCriterionList

    public void appendToCriterionList(Criterion c)
    For a Criterion that uses `OperatorId.AND` or `OperatorId.OR`, add an additional Criterion to the list of subcriteria to be evaluated.

  - ### setCustomOperator

    public void setCustomOperator(String operator)
    Specifies a "custom" operator to this criterion.
    Parameters:
      `operator` - the operator

  - ### markAdvancedCriteria

    public void markAdvancedCriteria()

  - ### unmarkAdvancedCriteria

    public void unmarkAdvancedCriteria()

  - ### getValueAsString

    public String getValueAsString()
    Retrieves the specified value for this criterion. Only applies to criterion where operator and value have been specified - will not apply to criterion containing {@link #getCriteria(),sub criteria}.
    Returns:

  - ### getValueAsInt

    public final Integer getValueAsInt()
    Synonym of `getValueAsInteger()`.

  - ### getValueAsInteger

    public Integer getValueAsInteger()
    Retrieves the specified value for this criterion. Only applies to criterion where operator and value have been specified - will not apply to criterion containing {@link #getCriteria(),sub criteria}.
    Returns:

  - ### getValueAsFloat

    public Float getValueAsFloat()
    Retrieves the specified value for this criterion. Only applies to criterion where operator and value have been specified - will not apply to criterion containing {@link #getCriteria(),sub criteria}.
    Returns:

  - ### getValueAsDate

    public Date getValueAsDate()
    Retrieves the specified value for this criterion. Only applies to criterion where operator and value have been specified - will not apply to criterion containing {@link #getCriteria(),sub criteria}.
    Returns:

  - ### getValueAsBoolean

    public Boolean getValueAsBoolean()
    Retrieves the specified value for this criterion. Only applies to criterion where operator and value have been specified - will not apply to criterion containing {@link #getCriteria(),sub criteria}.
    Returns:

  - ### getValueAsStringArray

    public String[] getValueAsStringArray()
    Retrieves the specified value for this criterion. Only applies to criterion where operator and value have been specified - will not apply to criterion containing {@link #getCriteria(),sub criteria}.
    Returns:

  - ### getValueAsIntArray

    public int[] getValueAsIntArray()
    Retrieves the specified value for this criterion. Only applies to criterion where operator and value have been specified - will not apply to criterion containing {@link #getCriteria(),sub criteria}.
    Returns:

  - ### asAdvancedCriteria

    public AdvancedCriteria asAdvancedCriteria()
    Returns an AdvancedCriteria derived from this Criteria object.
    Overrides:
      `asAdvancedCriteria` in class `Criteria`
    Returns: