com.smartgwt.client.data

## Class Criteria

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

- Direct Known Subclasses:
    Criterion

      public class Criteria
      extends DataClass

  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 ResultSets via ResultSet.applyFilter().
  The criteria format supported by the SmartClient Server built-in SQLDataSource and HibernateDataSource is a JavaScript Object where each property specifies the name and required value for a field. Multiple legal values for a field can be provided as an Array.

- - ### Field Summary

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

      `jsObj`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Criteria()`
    `Criteria(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `Criteria(java.lang.String field, java.lang.String value)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addCriteria(Criteria otherCriteria)` Adds the criteria from the passed criteria object.
    `void` | `addCriteria(java.lang.String field, java.lang.Boolean value)`
    `void` | `addCriteria(java.lang.String field, java.util.Date value)`
    `void` | `addCriteria(java.lang.String field, java.lang.Double[] value)`
    `void` | `addCriteria(java.lang.String field, java.lang.Float value)`
    `void` | `addCriteria(java.lang.String field, java.lang.Integer value)`
    `void` | `addCriteria(java.lang.String field, java.lang.Integer[] value)`
    `void` | `addCriteria(java.lang.String field, java.lang.Long value)`
    `void` | `addCriteria(java.lang.String field, java.lang.Object value)`
    `void` | `addCriteria(java.lang.String field, java.lang.String value)`
    `void` | `addCriteria(java.lang.String field, java.lang.String[] value)`
    `AdvancedCriteria` | `asAdvancedCriteria()` Returns an AdvancedCriteria derived from this Criteria object.
    `static Criteria[]` | `convertToCriteriaArray(com.google.gwt.core.client.JavaScriptObject nativeArray)`
    `static Criteria` | `getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `java.util.Map` | `getValues()` Return the criteria values as a name-value Map.
    `boolean` | `isAdvanced()` Does this represent an underlying AdvancedCriteria object in JavaScript?

    - ### Methods inherited from class com.smartgwt.client.core.DataClass

      `doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, getJsObj, 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`

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

      `equals, hashCode, isCreated, setJsObj`

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

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

- - ### Constructor Detail

    - #### Criteria

          public Criteria()

    - #### Criteria

          public Criteria(java.lang.String field,
                  java.lang.String value)

    - #### Criteria

          public Criteria(com.google.gwt.core.client.JavaScriptObject jsObj)

  - ### Method Detail

    - #### getOrCreateRef

          public static Criteria getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)

    - #### addCriteria

          public void addCriteria(java.lang.String field,
                         java.lang.String value)

    - #### addCriteria

          public void addCriteria(java.lang.String field,
                         java.lang.Integer value)

    - #### addCriteria

          public void addCriteria(java.lang.String field,
                         java.lang.Boolean value)

    - #### addCriteria

          public void addCriteria(java.lang.String field,
                         java.util.Date value)

    - #### addCriteria

          public void addCriteria(java.lang.String field,
                         java.lang.Float value)

    - #### addCriteria

          public void addCriteria(java.lang.String field,
                         java.lang.Long value)

    - #### addCriteria

          public void addCriteria(java.lang.String field,
                         java.lang.String[] value)

    - #### addCriteria

          public void addCriteria(java.lang.String field,
                         java.lang.Integer[] value)

    - #### addCriteria

          public void addCriteria(java.lang.String field,
                         java.lang.Double[] value)

    - #### addCriteria

          public void addCriteria(java.lang.String field,
                         java.lang.Object value)

    - #### addCriteria

          public void addCriteria(Criteria otherCriteria)

      Adds the criteria from the passed criteria object.
      Parameters:
        `otherCriteria` - the passed criteria object

    - #### getValues

          public java.util.Map getValues()

      Return the criteria values as a name-value Map.
      Returns:
        the criteria values as a Map

    - #### convertToCriteriaArray

          public static Criteria[] convertToCriteriaArray(com.google.gwt.core.client.JavaScriptObject nativeArray)

    - #### isAdvanced

          public boolean isAdvanced()

      Does this represent an underlying AdvancedCriteria object in JavaScript?
      Returns:

    - #### asAdvancedCriteria

          public AdvancedCriteria asAdvancedCriteria()

      Returns an AdvancedCriteria derived from this Criteria object.
      Returns: