com.smartgwt.client.data

## Class ResultSet

- java.lang.Object
- - com.smartgwt.client.core.BaseClass
  - - com.smartgwt.client.data.RecordList
    - - com.smartgwt.client.data.ResultSet

- All Implemented Interfaces:
    HasHandlers, HasDataArrivedHandlers, HasDataChangedHandlers

      public class ResultSet
      extends RecordList
      implements HasDataArrivedHandlers

  ResultSets are a subclass implementation of `RecordList` that automatically fetches DataSource records when items are requested from the List. ResultSets provide robust, customizable, high-performance cache management for ListGrids and other built-in SmartGWT components, and can be used as cache managers by custom components.

  ResultSets manage data paging, that is, loading records in batches as the user navigates the data set. A ResultSet will switch to using client-side sorting and filtering when possible to improve responsiveness and reduce server load. ResultSets also participate in automatic cache synchronization, observing operations on DataSources and automatically updating their caches.

  Creation

  A ResultSet can be passed to any component that expects a List, and the List APIs can be called directly on the ResultSet as long as the caller is able to deal with asynchronous loading; see `getRange(int, int)`.

  Generally ResultSets do not need to be created directly, but are created by DataBound components as an automatic consequence of calling `'DataBound Component Methods'`. For example, the `ListGrid.fetchData()` causes `data` to become an automatically created `ResultSet` object. Automatically created ResultSets can be customized via properties on ListGrids such as `dataPageSize` and `dataProperties`. All ResultSets for a given DataSource may also be customized via setting `resultSetClass` to the name of a ResultSet `com.smartgwt.client.util.isc#defineClass` in which `com.smartgwt.client..Class#addProperties`.

  A ResultSet defaults to using data paging, setting `startRow` and `endRow` in issued dsRequests. Server code may always return more rows than the ResultSet requests and the ResultSet will correctly integrate those rows based on `startRow`/`'endRow'`. Hence the server can always avoid paging mode by simply returning all matching rows.

  A ResultSet can be created directly with just the ID of a `DataSource`:

       isc.ResultSet.create({
               dataSource : "dataSourceID"
           })

  Directly created ResultSets are typically used by custom components, or as a means of managing datasets that will be used by several components.

  When created directly rather than via a dataBoundComponent, a newly created ResultSet will not issue it's first "fetch" `DSRequest` until data is accessed (for example, via `get(int)`).

  Paging and total dataset length

  When using data paging, the server communicates the total number of records that match the current search criteria by setting `totalRows`. The ResultSet will then return this number from `getLength()`, and ListGrids and other components will show a scrollbar that allows the user to jump to the end of the dataset directly.

  However, the ResultSet does not require that the server calculate the true length of the dataset, which can be costly for an extremely large, searchable dataset. Instead, the server may simply advertise a `totalRows` value that is one page larger than the last row loaded. This results in a UI sometimes called "progressive loading", where the user may load more rows by scrolling past the end of the currently loaded rows, but is not allowed to skip to the end of the dataset.

  No client-side settings are required to enable this mode - it is entirely server-driven. However, it is usually coupled with `'disabling sorting'`, since server-side sorting would also force the server to traverse the entire dataset.

  Client-side Sorting and Filtering

  If a ResultSet obtains a full cache for the current set of filter criteria, it will automatically switch to client-side sorting, and will also use client-side filtering if the filter criteria are later changed but appear to be more restrictive than the criteria in use when the ResultSet obtained a full cache.

  The `'useClientSorting'` and `'useClientFiltering'` flags can be used to disable client-side sorting and filtering respectively if these behaviors don't match server-based sorting and filtering. However, because client-side sorting and filtering radically improve responsiveness and reduce server load, it is better to customize the ResultSet so that it can match server-side sorting and filtering behaviors.

  Sorting behavior is primarily customized via the "sort normalizer" passed to `RecordList.sortByProperty(java.lang.String, boolean)`, either via direct calls on a standalone ResultSet, or via `com.smartgwt.client.widgets.grid.ListGridField#sortNormalizer` for a ListGrid-managed ResultSet.

  By default, client-side filtering interprets the `Criteria` passed to `setCriteria(com.smartgwt.client.data.Criteria)` as a set of field values that records must match (similarly to the built-in SQL/Hibernate connectors built into the SmartGWT Server). Custom client-side filtering logic can be implemented by overriding `ResultSet#applyFilter`. Overriding `compareCriteria(com.smartgwt.client.data.Criteria, com.smartgwt.client.data.Criteria)` allows you to control when the ResultSet uses client-side vs server-side filtering, and the ResultSet has two default `'criteria policies'` built-in.

  Updates and Automatic Cache Synchronization

  ResultSets observe any successful "update", "add" or "remove" dsRequests against their DataSource, regardless of the component that initiated them. A ResultSet with a full cache for the current filter criteria will integrate updates into the cache automatically.

  Updated rows that no longer match the current filter criteria will be removed automatically. To prevent this, you can set `neverDropUpdatedRows`. Added rows will similarly be added to the cache only if they match current filter criteria.

  Note that the client-side filtering described above is also used to determine whether updated or added rows should be in the cache. If any aspect of automated cache update is ever incorrect, `'dropCacheOnUpdate'` can be set for the ResultSet or `invalidateCache` can be set for an individual dsResponse.

  Data Paging with partial cache

  When in paging mode with a partial cache, a ResultSet relies on server side sorting, setting `sortBy` to the current sort field and direction. In order for the cache to remain coherent, row numbering must continue to agree between server and client as new fetches are issued, otherwise, duplicate rows or missing rows may occur.

  If concurrent modifications by other users are allowed, generally the server should set `invalidateCache` to clear the cache when concurrent modification is detected.

  In paging mode with a partial cache, any successful "update" or "add" operation may cause client and server row numbering to become out of sync. This happens because the update may affect the sort order, and client and server cannot be guaranteed to match for sets of records that have equivalent values for the sort field.

  For this reason, after an "add" or "update" operation with a partial cache, the ResultSet will automatically mark cache for invalidation the next time a fetch operation is performed. Alternatively, if `updatePartialCache` is set to false, the ResultSet will simply invalidate cache immediately in this circumstance.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class com.smartgwt.client.data.RecordList

      `RecordList.SortNormalizer`

  - ### Field Summary

    - ### Fields inherited from class com.smartgwt.client.data.RecordList

      `jsObj`

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

      `config, factoryCreated, factoryProperties, id, scClassName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ResultSet()`
    `ResultSet(DataSource dataSource)`
    `ResultSet(JavaScriptObject jsObj)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `HandlerRegistration` | `addDataArrivedHandler(DataArrivedHandler handler)` Add a dataArrived handler.
    `boolean` | `allMatchingRowsCached()` Do we have a complete client-side cache of records for the current filter criteria?
    `boolean` | `allRowsCached()` Do we have a complete client-side cache of all records for this DataSource?
    `static ResultSet` | `asSGWTComponent(JavaScriptObject jsObj)` Returns the existing SGWT ResultSet, or creates and returns one if none exist, associated with the supplied `JavaScriptObject`.
    `int` | `compareCriteria(Criteria newCriteria, Criteria oldCriteria)` Default behavior is to call `DataSource.compareCriteria(com.smartgwt.client.data.Criteria, com.smartgwt.client.data.Criteria)` to determine whether new criteria is guaranteed more restrictive, equivalent to the old criteria, or not guaranteed more restrictive, returning 1, 0 or -1 respectively.
    `int` | `compareCriteria(Criteria newCriteria, Criteria oldCriteria, DSRequest requestProperties, java.lang.String policy)` Default behavior is to call `DataSource.compareCriteria(com.smartgwt.client.data.Criteria, com.smartgwt.client.data.Criteria)` to determine whether new criteria is guaranteed more restrictive, equivalent to the old criteria, or not guaranteed more restrictive, returning 1, 0 or -1 respectively.
    `protected JavaScriptObject` | `create()`
    `void` | `dataArrived(int startRow, int endRow)` Notification fired when data has arrived from the server and has been successfully integrated into the cache.
    `void` | `ensureCreated()` Ensures that the underlying SmartClient ResultSet object is created for this ResultSet instance.
    `void` | `filterLocalData()` Derive the current filtered set of data from the cache of all matching rows.
    `Record` | `find(java.util.Map properties)` Checks only loaded rows and will not trigger a fetch.
    `Record` | `find(java.lang.String propertyName, java.lang.Object value)` Like `RecordList.find(java.lang.String, java.lang.Object)`.
    `Record[]` | `findAll(java.util.Map properties)` Checks only loaded rows and will not trigger a fetch.
    `Record[]` | `findAll(java.lang.String propertyName, boolean value)` Checks only loaded rows and will not trigger a fetch.
    `Record[]` | `findAll(java.lang.String propertyName, java.util.Date value)` Find all objects where property == value in the object.
    `Record[]` | `findAll(java.lang.String propertyName, float value)` Checks only loaded rows and will not trigger a fetch.
    `Record[]` | `findAll(java.lang.String propertyName, int value)` Checks only loaded rows and will not trigger a fetch.
    `Record[]` | `findAll(java.lang.String propertyName, java.lang.Long value)` Checks only loaded rows and will not trigger a fetch.
    `Record[]` | `findAll(java.lang.String propertyName, java.lang.String value)` Checks only loaded rows and will not trigger a fetch.
    `Record` | `findByKey(java.lang.String keyValue)` Attempt to find the record in the resultSet that has a primary key value that matches the passed in parameter value.
    `int` | `findIndex(java.util.Map properties)` Like `RecordList.findIndex(java.util.Map)`.
    `int` | `findIndex(java.lang.String propertyName, boolean value)` Like `RecordList.findIndex(java.util.Map)`.
    `int` | `findIndex(java.lang.String propertyName, java.util.Date value)` Like `RecordList.findIndex(java.util.Map)`.
    `int` | `findIndex(java.lang.String propertyName, float value)` Like `RecordList.findIndex(java.util.Map)`.
    `int` | `findIndex(java.lang.String propertyName, int value)` Like `RecordList.findIndex(java.util.Map)`.
    `int` | `findIndex(java.lang.String propertyName, java.lang.Long value)` Like `RecordList.findIndex(java.util.Map)`.
    `int` | `findIndex(java.lang.String propertyName, java.lang.String value)` Like `RecordList.findIndex(java.util.Map)`.
    `int` | `findNextIndex(int startIndex, java.util.Map properties)` Like `RecordList.findNextIndex(int, java.lang.String)`.
    `int` | `findNextIndex(int startIndex, java.lang.String propertyName)` Like `RecordList.findNextIndex(int, java.lang.String)`.
    `int` | `findNextIndex(int startIndex, java.lang.String propertyName, boolean value, int endIndex)` Like `RecordList.findNextIndex(int, java.lang.String)`.
    `int` | `findNextIndex(int startIndex, java.lang.String propertyName, java.util.Date value, int endIndex)` Like `RecordList.findNextIndex(int, java.lang.String)`.
    `int` | `findNextIndex(int startIndex, java.lang.String propertyName, float value, int endIndex)` Like `RecordList.findNextIndex(int, java.lang.String)`.
    `int` | `findNextIndex(int startIndex, java.lang.String propertyName, int value, int endIndex)` Like `RecordList.findNextIndex(int, java.lang.String)`.
    `int` | `findNextIndex(int startIndex, java.lang.String propertyName, java.lang.Long value, int endIndex)` Like `RecordList.findNextIndex(int, java.lang.String)`.
    `int` | `findNextIndex(int startIndex, java.lang.String propertyName, java.lang.String value, int endIndex)` Like `RecordList.findNextIndex(int, java.lang.String)`.
    `Record` | `get(int pos)` Returns the record at the specified position.
    `RecordList` | `getAllCachedRows()` Returns a list of all rows that have been cached.
    `RecordList` | `getAllVisibleRows()` Returns a list of the currently visible data, that is, all rows that match the current criteria, with null entries or `loading markers` for rows that are not yet loaded or in the process of loading, respectively.
    `java.lang.Boolean` | `getAlwaysRequestVisibleRows()` If true, records requested only for visible area.
    `Criteria` | `getCriteria()` Filter criteria used whenever records are retrieved.
    `CriteriaPolicy` | `getCriteriaPolicy()` Decides under what conditions the cache should be dropped when the `Criteria` changes.
    `DataSource` | `getDataSource()` What `DataSource` is this resultSet associated with?
    `java.lang.Boolean` | `getDisableCacheSync()` By default when the data of this ResultSet's dataSource is modified, the ResultSet will be updated to display these changes.
    `java.lang.Boolean` | `getDropCacheOnUpdate()` Whether to discard all cached rows when a modification operation (add, update, remove) occurs on the ResultSet's DataSource.
    `int` | `getFetchDelay()` Delay in milliseconds before fetching rows.
    `FetchMode` | `getFetchMode()` Mode of fetching records from the server.
    `java.lang.String` | `getFetchOperation()` Operation this dataModel should use to fetch sets of objects
    `int` | `getLength()` Return the total number of records that match the current filter criteria.
    `static Record` | `getLoadingMarker()` Returns the singleton marker object that is used as a placeholder for records that are being loaded from the server.
    `java.lang.Boolean` | `getNeverDropUpdatedRows()` By default when a a row is returned by the server, the current `setCriteria(com.smartgwt.client.data.Criteria)` are applied to it, and it may disappear from the cache.
    `static ResultSet` | `getOrCreateRef(JavaScriptObject jsObj)`
    `Record[]` | `getRange(int start, int end)` Return the items between position start and end, non-inclusive at the end, possibly containing markers for records that haven't loaded yet.
    `RecordList` | `getRangeAsRecordList(int start, int end)` Return a RecordList with the items between position start and end, non-inclusive at the end.
    `int` | `getResultSize()` How many rows to retrieve at once.
    `java.lang.Boolean` | `getUpdateCacheFromRequest()` When a successful Add, Update or Remove type operation fires on this ResultSet's dataSource, if `data` is unset, should we integrate the submitted data values (from the request) into our data-set? This attribute will be passed to `DataSource#getUpdatedData` as the `useDataFromRequest` parameter.
    `java.lang.Boolean` | `getUpdatePartialCache()` If set to true, updated and added rows will be integrated into the client-side cache even if paging is enabled and cache is partial.
    `java.lang.Boolean` | `getUseClientFiltering()` Whether to filter data locally when all DataSource records have been loaded (that is, criteria is blank and cache is complete).
    `java.lang.Boolean` | `getUseClientSorting()` Whether to sort data locally when all records matching the current criteria have been cached.
    `java.util.Map` | `getValueMap(java.lang.String idField, java.lang.String displayField)` Get a map of the form `{ item[idField] -> item[displayField] }`, for all items in the list.
    `int` | `indexOf(Record record)` Return the position in the list of the first instance of the specified object.
    `int` | `indexOf(Record record, int pos, int endPos)` Return the position in the list of the first instance of the specified object.
    `void` | `invalidateCache()` Manually invalidate this ResultSet's cache.
    `static boolean` | `isResultSet(JavaScriptObject data)`
    `java.lang.Boolean` | `lengthIsKnown()` Whether the ResultSet actually knows how many records are available from the server.
    `java.lang.Boolean` | `rangeIsLoaded(int startRow, int endRow)` Whether the given range of rows has been loaded.
    `java.lang.Boolean` | `rowIsLoaded(int rowNum)` Whether the given row has been loaded.
    `void` | `setAllRows(Record[] allRows)` If the complete set of records for a resultSet is available when the resultSet is created, it can be made available to the resultSet via this property at initialization time.
    `void` | `setAlwaysRequestVisibleRows(java.lang.Boolean alwaysRequestVisibleRows)` If true, records requested only for visible area.
    `void` | `setCriteria(Criteria criteria)` Filter criteria used whenever records are retrieved.
    `void` | `setCriteriaPolicy(CriteriaPolicy criteriaPolicy)` Decides under what conditions the cache should be dropped when the `Criteria` changes.
    `void` | `setDataSource(DataSource dataSource)` What `DataSource` is this resultSet associated with?
    `void` | `setDisableCacheSync(java.lang.Boolean disableCacheSync)` By default when the data of this ResultSet's dataSource is modified, the ResultSet will be updated to display these changes.
    `void` | `setDropCacheOnUpdate(java.lang.Boolean dropCacheOnUpdate)` Whether to discard all cached rows when a modification operation (add, update, remove) occurs on the ResultSet's DataSource.
    `void` | `setFetchDelay(int fetchDelay)` Delay in milliseconds before fetching rows.
    `void` | `setFetchMode(FetchMode fetchMode)` Mode of fetching records from the server.
    `void` | `setFetchOperation(java.lang.String fetchOperation)` Operation this dataModel should use to fetch sets of objects
    `void` | `setInitialData(Record[] initialData)` Initial set of data for the ResultSet.
    `void` | `setInitialLength(java.lang.Integer initialLength)` Initial value of the data set length.
    `void` | `setInitialSort(SortSpecifier... sortSpecifiers)` Initial multi property sort specification for this ResultSet's data.
    `void` | `setNeverDropUpdatedRows(java.lang.Boolean neverDropUpdatedRows)` By default when a a row is returned by the server, the current `setCriteria(com.smartgwt.client.data.Criteria)` are applied to it, and it may disappear from the cache.
    `void` | `setResultSize(int resultSize)` How many rows to retrieve at once.
    `void` | `setUpdateCacheFromRequest(java.lang.Boolean updateCacheFromRequest)` When a successful Add, Update or Remove type operation fires on this ResultSet's dataSource, if `data` is unset, should we integrate the submitted data values (from the request) into our data-set? This attribute will be passed to `DataSource#getUpdatedData` as the `useDataFromRequest` parameter.
    `void` | `setUpdatePartialCache(java.lang.Boolean updatePartialCache)` If set to true, updated and added rows will be integrated into the client-side cache even if paging is enabled and cache is partial.
    `void` | `setUseClientFiltering(java.lang.Boolean useClientFiltering)` Whether to filter data locally when all DataSource records have been loaded (that is, criteria is blank and cache is complete).
    `void` | `setUseClientSorting(java.lang.Boolean useClientSorting)` Whether to sort data locally when all records matching the current criteria have been cached.
    `java.lang.Boolean` | `usingFilteredData()` Determine whether the ResultSet is showing a filtered, proper subset of the cached rows.
    `java.lang.Boolean` | `willFetchData(Criteria newCriteria)` Will changing the criteria for this resultSet require fetching new data from the server, or can the new criteria be satisfied from data already cached on the client? Second `textMatchStyle` parameter determines whether a change of text-match style will require a server fetch - for example if filter is being changed between an exact match (from e.g: `ListGrid.fetchData()`) and a substring match (from e.g: `ListGrid.filterData()`). This method can be used to determine whether `ListGrid.fetchData()` or `ListGrid.filterData()` would cause a server side fetch when passed a certain set of criteria.
    `java.lang.Boolean` | `willFetchData(Criteria newCriteria, java.lang.String textMatchStyle)` Will changing the criteria for this resultSet require fetching new data from the server, or can the new criteria be satisfied from data already cached on the client? Second `textMatchStyle` parameter determines whether a change of text-match style will require a server fetch - for example if filter is being changed between an exact match (from e.g: `ListGrid.fetchData()`) and a substring match (from e.g: `ListGrid.filterData()`). This method can be used to determine whether `ListGrid.fetchData()` or `ListGrid.filterData()` would cause a server side fetch when passed a certain set of criteria.

    - ### Methods inherited from class com.smartgwt.client.data.RecordList

      `add, addAt, addDataChangedHandler, addList, addList, addListAt, contains, contains, containsAll, duplicate, equals, find, find, find, find, findAll, findIndex, findNextIndex, findNextIndex, first, getItems, getJsObj, getOrCreateJsObj, getProperty, getRangeList, intersect, isARecordList, isCreated, isEmpty, last, lastIndexOf, lastIndexOf, remove, removeAt, removeList, set, setLength, setSort, sort, sort, sortByProperty, sortByProperty, toArray`

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

      `applyFactoryProperties, createJsObj, destroy, doAddHandler, doInit, error, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getClassName, getConfig, getHandlerCount, getID, getRef, getScClassName, getTestInstance, hasAutoAssignedID, internalSetID, internalSetID, isFactoryCreated, onBind, onInit, registerID, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setFactoryCreated, setID, setJavaScriptObject, setProperty, setProperty, setProperty, setProperty, setScClassName`

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

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

    - ### Methods inherited from interface com.google.gwt.event.shared.HasHandlers

      `fireEvent`

- - ### Constructor Detail

    - #### ResultSet

          public ResultSet()

    - #### ResultSet

          public ResultSet(DataSource dataSource)

    - #### ResultSet

          public ResultSet(JavaScriptObject jsObj)

  - ### Method Detail

    - #### getOrCreateRef

          public static ResultSet getOrCreateRef(JavaScriptObject jsObj)

    - #### create

          protected JavaScriptObject create()

      Overrides:
        `create` in class `RecordList`

    - #### asSGWTComponent

          public static ResultSet asSGWTComponent(JavaScriptObject jsObj)

      Returns the existing SGWT ResultSet, or creates and returns one if none exist, associated with the supplied `JavaScriptObject`. If the supplied object is not a SmartClient ResultSet, a warning will be logged and null returned; otherwise the SGWT ResultSet will be returned.
      Parameters:
        `jsObj` - SmartClient ResultSet whose wrapper is wanted
      Returns:
        wrapping SGWT ResultSet or null

    - #### ensureCreated

          public void ensureCreated()
                             throws java.lang.IllegalStateException

      Ensures that the underlying SmartClient ResultSet object is created for this ResultSet instance. If the SmartClient object has already been created, then calling this method amounts to a no-op. Otherwise, the `isc.ResultSet.create()` function is executed to create the SmartClient ResultSet object wrapped by this instance.

      This method is required to be called for standalone usage of a ResultSet. In addition, it can only be called after all initial configuration (`dataSource`, `allRows` if being used, etc.) has been set.

      Throws:
        `java.lang.IllegalStateException` - if no dataSource has been set

    - #### setFetchMode

          public void setFetchMode(FetchMode fetchMode)
                            throws java.lang.IllegalStateException

      Mode of fetching records from the server. If unset, will default to `"local"` if `allRows` is specified, otherwise `"paged"`.

      Note : This is an advanced setting

      Parameters:
        `fetchMode` - fetchMode Default value is null
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getFetchMode

          public FetchMode getFetchMode()

      Mode of fetching records from the server. If unset, will default to `"local"` if `allRows` is specified, otherwise `"paged"`.
      Returns:
        FetchMode

    - #### setInitialData

          public void setInitialData(Record[] initialData)
                              throws java.lang.IllegalStateException

      Initial set of data for the ResultSet.

      This data will be treated exactly as though it were the data returned from the ResultSet's first server fetch.

      By default, `initialData` will be considered a complete response (all rows that match the `Criteria` which the ResultSet was initialized with).

      Set `initialLength` to treat `initialData` as a partial response, equivalent to receiving a `DSResponse` with `startRow:0`, `endRow:initialData.length` and `totalRows:initialLength`. Normal data paging will then occur if data is requested for row indices not filled via `initialData`.

      Note : This is an advanced setting

      Parameters:
        `initialData` - initialData Default value is null
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### setInitialLength

          public void setInitialLength(java.lang.Integer initialLength)
                                throws java.lang.IllegalStateException

      Initial value of the data set length.

      To create a ResultSet with it's cache partly filled, see `initialData`.

      Note : This is an advanced setting

      Parameters:
        `initialLength` - initialLength Default value is null
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### setInitialSort

          public void setInitialSort(SortSpecifier... sortSpecifiers)

      Initial multi property sort specification for this ResultSet's data. If a ResultSet is being explicitly created and seeded with `setInitialData(Record[])`, this method may be used to notify the ResultSet that the data is already sorted such that a call to `RecordList.setSort(SortSpecifier...)` will not require a new fetch unless additional data beyond the ends of the specified initialData are required.
      Parameters:
        `sortSpecifiers` - Initial sort specification

    - #### setAllRows

          public void setAllRows(Record[] allRows)
                          throws java.lang.IllegalStateException

      If the complete set of records for a resultSet is available when the resultSet is created, it can be made available to the resultSet via this property at initialization time. This data will then be considered cached meaning sorting and filtering can occur on the client (no need for server fetch). This cached data can be dropped via a call to `invalidateCache()`.

      Note : This is an advanced setting

      Parameters:
        `allRows` - allRows Default value is null
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### setResultSize

          public void setResultSize(int resultSize)

      How many rows to retrieve at once.

      Applicable only with `fetchMode: "paged"`. When a paged ResultSet is asked for rows that have not yet been loaded, it will fetch adjacent rows that are likely to be required soon, in batches of this size.

      Note : This is an advanced setting

      Parameters:
        `resultSize` - resultSize Default value is 75

    - #### getResultSize

          public int getResultSize()

      How many rows to retrieve at once.

      Applicable only with `fetchMode: "paged"`. When a paged ResultSet is asked for rows that have not yet been loaded, it will fetch adjacent rows that are likely to be required soon, in batches of this size.

      Returns:
        int

    - #### setFetchDelay

          public void setFetchDelay(int fetchDelay)

      Delay in milliseconds before fetching rows.

      When a get() or getRange() call asked for rows that haven't been loaded, the ResultSet will wait before actually triggering the request. If, during the delay, more get() or getRange() calls are made for missing rows, the final fetch to the server will reflect the most recently requested rows.

      The intent of this delay is to avoid triggering many unnecessary fetches during drag-scrolling and similar user interactions.

      Note : This is an advanced setting

      Parameters:
        `fetchDelay` - fetchDelay Default value is 0

    - #### getFetchDelay

          public int getFetchDelay()

      Delay in milliseconds before fetching rows.

      When a get() or getRange() call asked for rows that haven't been loaded, the ResultSet will wait before actually triggering the request. If, during the delay, more get() or getRange() calls are made for missing rows, the final fetch to the server will reflect the most recently requested rows.

      The intent of this delay is to avoid triggering many unnecessary fetches during drag-scrolling and similar user interactions.

      Returns:
        int

    - #### setDataSource

          public void setDataSource(DataSource dataSource)
                             throws java.lang.IllegalStateException

      What `DataSource` is this resultSet associated with?
      Parameters:
        `dataSource` - dataSource Default value is null
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getDataSource

          public DataSource getDataSource()

      What `DataSource` is this resultSet associated with?
      Returns:
        DataSource

    - #### setFetchOperation

          public void setFetchOperation(java.lang.String fetchOperation)

      Operation this dataModel should use to fetch sets of objects
      Parameters:
        `fetchOperation` - fetchOperation Default value is null
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getFetchOperation

          public java.lang.String getFetchOperation()

      Operation this dataModel should use to fetch sets of objects
      Returns:
        String

    - #### setCriteria

          public void setCriteria(Criteria criteria)

      Filter criteria used whenever records are retrieved.

      Use `setCriteria(com.smartgwt.client.data.Criteria)` to change the criteria after initialization. Set the filter criteria to use when fetching rows.

      Setting new criteria will invalidate the current cache, if any.

      Note: any field values in the criteria explicitly specified as null will be passed to the server. By default the server then returns only records whose value is null for that field. This differs from certain higher level methods such as `ListGrid.fetchData()` which prune null criteria fields before performing a fetch operation.

      Parameters:
        `criteria` - the filter criteria. Default value is null

    - #### getCriteria

          public Criteria getCriteria()

      Filter criteria used whenever records are retrieved.

      Use `setCriteria(com.smartgwt.client.data.Criteria)` to change the criteria after initialization.

      Returns:
        Get the current criteria for this ResultSet.

    - #### setCriteriaPolicy

          public void setCriteriaPolicy(CriteriaPolicy criteriaPolicy)

      Decides under what conditions the cache should be dropped when the `Criteria` changes.

      Note : This is an advanced setting

      Parameters:
        `criteriaPolicy` - criteriaPolicy Default value is null

    - #### getCriteriaPolicy

          public CriteriaPolicy getCriteriaPolicy()

      Decides under what conditions the cache should be dropped when the `Criteria` changes.
      Returns:
        CriteriaPolicy

    - #### setUseClientSorting

          public void setUseClientSorting(java.lang.Boolean useClientSorting)

      Whether to sort data locally when all records matching the current criteria have been cached.

      This may need to be disabled if client-side sort order differs from server-side sort order in a way that affects functionality or is surprising.

      Note : This is an advanced setting

      Parameters:
        `useClientSorting` - useClientSorting Default value is true

    - #### getUseClientSorting

          public java.lang.Boolean getUseClientSorting()

      Whether to sort data locally when all records matching the current criteria have been cached.

      This may need to be disabled if client-side sort order differs from server-side sort order in a way that affects functionality or is surprising.

      Returns:
        Boolean

    - #### setUseClientFiltering

          public void setUseClientFiltering(java.lang.Boolean useClientFiltering)

      Whether to filter data locally when all DataSource records have been loaded (that is, criteria is blank and cache is complete).

      This may need to be disabled if client-side filtering differs from server-side filtering in a way that affects functionality or is surprising.

      This setting is distinct from `fetchMode:"local"`, which explicitly loads all available DataSource records up front.

      See `ResultSet#applyFilter` for default filtering behavior.

      NOTE: even with useClientFiltering false, client-side filtering will be used during cache sync to determine if an updated or added row matches the current criteria. To avoid relying on client-side filtering in this case, either:
      - avoid returning update data when the updated row doesn't match the current filter
      - set dropCacheOnUpdate

      Note : This is an advanced setting

      Parameters:
        `useClientFiltering` - useClientFiltering Default value is true

    - #### getUseClientFiltering

          public java.lang.Boolean getUseClientFiltering()

      Whether to filter data locally when all DataSource records have been loaded (that is, criteria is blank and cache is complete).

      This may need to be disabled if client-side filtering differs from server-side filtering in a way that affects functionality or is surprising.

      This setting is distinct from `fetchMode:"local"`, which explicitly loads all available DataSource records up front.

      See `ResultSet#applyFilter` for default filtering behavior.

      NOTE: even with useClientFiltering false, client-side filtering will be used during cache sync to determine if an updated or added row matches the current criteria. To avoid relying on client-side filtering in this case, either:
      - avoid returning update data when the updated row doesn't match the current filter
      - set dropCacheOnUpdate

      Returns:
        Boolean

    - #### setUpdateCacheFromRequest

          public void setUpdateCacheFromRequest(java.lang.Boolean updateCacheFromRequest)
                                         throws java.lang.IllegalStateException

      When a successful Add, Update or Remove type operation fires on this ResultSet's dataSource, if `data` is unset, should we integrate the submitted data values (from the request) into our data-set? This attribute will be passed to `DataSource#getUpdatedData` as the `useDataFromRequest` parameter.

      Note : This is an advanced setting

      Parameters:
        `updateCacheFromRequest` - updateCacheFromRequest Default value is true
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getUpdateCacheFromRequest

          public java.lang.Boolean getUpdateCacheFromRequest()

      When a successful Add, Update or Remove type operation fires on this ResultSet's dataSource, if `data` is unset, should we integrate the submitted data values (from the request) into our data-set? This attribute will be passed to `DataSource#getUpdatedData` as the `useDataFromRequest` parameter.
      Returns:
        Boolean

    - #### setDropCacheOnUpdate

          public void setDropCacheOnUpdate(java.lang.Boolean dropCacheOnUpdate)
                                    throws java.lang.IllegalStateException

      Whether to discard all cached rows when a modification operation (add, update, remove) occurs on the ResultSet's DataSource.

      A ResultSet that has a complete cache for the current filter criteria can potentially incorporate a newly created or updated row based on the data that the server returns when a modification operation completes. However this is not always possible for ResultSets that show some types of joins, or when the server cannot easily return update data. In this case set `dropCacheOnUpdate` to cause the cache to be discarded when an update occurs.

      `dropCacheOnUpdate` can be set either directly on a ResultSet, or on a DataSource in order to affect all ResultSets on that DataSource.

      Note : This is an advanced setting

      Parameters:
        `dropCacheOnUpdate` - dropCacheOnUpdate Default value is false
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getDropCacheOnUpdate

          public java.lang.Boolean getDropCacheOnUpdate()

      Whether to discard all cached rows when a modification operation (add, update, remove) occurs on the ResultSet's DataSource.

      A ResultSet that has a complete cache for the current filter criteria can potentially incorporate a newly created or updated row based on the data that the server returns when a modification operation completes. However this is not always possible for ResultSets that show some types of joins, or when the server cannot easily return update data. In this case set `dropCacheOnUpdate` to cause the cache to be discarded when an update occurs.

      `dropCacheOnUpdate` can be set either directly on a ResultSet, or on a DataSource in order to affect all ResultSets on that DataSource.

      Returns:
        Boolean

    - #### setDisableCacheSync

          public void setDisableCacheSync(java.lang.Boolean disableCacheSync)
                                   throws java.lang.IllegalStateException

      By default when the data of this ResultSet's dataSource is modified, the ResultSet will be updated to display these changes. Set this flag to true to disable this behavior.

      Note : This is an advanced setting

      Parameters:
        `disableCacheSync` - disableCacheSync Default value is false
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getDisableCacheSync

          public java.lang.Boolean getDisableCacheSync()

      By default when the data of this ResultSet's dataSource is modified, the ResultSet will be updated to display these changes. Set this flag to true to disable this behavior.
      Returns:
        Boolean

    - #### setNeverDropUpdatedRows

          public void setNeverDropUpdatedRows(java.lang.Boolean neverDropUpdatedRows)
                                       throws java.lang.IllegalStateException

      By default when a a row is returned by the server, the current `setCriteria(com.smartgwt.client.data.Criteria)` are applied to it, and it may disappear from the cache.

      Set this flag to true to disable this behavior.

      Note : This is an advanced setting

      Parameters:
        `neverDropUpdatedRows` - neverDropUpdatedRows Default value is false
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getNeverDropUpdatedRows

          public java.lang.Boolean getNeverDropUpdatedRows()

      By default when a a row is returned by the server, the current `setCriteria(com.smartgwt.client.data.Criteria)` are applied to it, and it may disappear from the cache.

      Set this flag to true to disable this behavior.

      Returns:
        Boolean

    - #### setUpdatePartialCache

          public void setUpdatePartialCache(java.lang.Boolean updatePartialCache)
                                     throws java.lang.IllegalStateException

      If set to true, updated and added rows will be integrated into the client-side cache even if paging is enabled and cache is partial. If `updatePartialCache` is false, the cache will be invalidated and new data fetched.

      If updatePartialCache is enabled and an "add" or "update" operation succeeds with a partial cache:

      - updated rows will remain in their current position. No attempt will be made to sort them into a new position even if the sort field was updated.
      - newly added rows will be added at either the end (first preference) or beginning of the dataset if that part of the dataset is cached and was most recently requested. If not, the new row is added at the end of the most recently requested contiguously cached range
      The cache will then be dropped the next time rows are fetched, to prevent problems with inconsistent row numbering between the server and client, which could otherwise lead to duplicate rows or rows being skipped entirely.

      Note : This is an advanced setting

      Parameters:
        `updatePartialCache` - updatePartialCache Default value is true
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getUpdatePartialCache

          public java.lang.Boolean getUpdatePartialCache()

      If set to true, updated and added rows will be integrated into the client-side cache even if paging is enabled and cache is partial. If `updatePartialCache` is false, the cache will be invalidated and new data fetched.

      If updatePartialCache is enabled and an "add" or "update" operation succeeds with a partial cache:

      - updated rows will remain in their current position. No attempt will be made to sort them into a new position even if the sort field was updated.
      - newly added rows will be added at either the end (first preference) or beginning of the dataset if that part of the dataset is cached and was most recently requested. If not, the new row is added at the end of the most recently requested contiguously cached range
      The cache will then be dropped the next time rows are fetched, to prevent problems with inconsistent row numbering between the server and client, which could otherwise lead to duplicate rows or rows being skipped entirely.
      Returns:
        Boolean

    - #### setAlwaysRequestVisibleRows

          public void setAlwaysRequestVisibleRows(java.lang.Boolean alwaysRequestVisibleRows)
                                           throws java.lang.IllegalStateException

      If true, records requested only for visible area.
      Parameters:
        `alwaysRequestVisibleRows` - alwaysRequestVisibleRows Default value is false
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getAlwaysRequestVisibleRows

          public java.lang.Boolean getAlwaysRequestVisibleRows()

      If true, records requested only for visible area.
      Returns:
        Boolean

    - #### allMatchingRowsCached

          public boolean allMatchingRowsCached()

      Do we have a complete client-side cache of records for the current filter criteria?

      Returns false if this is a paged data set, and the entire set of records that match the current criteria has not been retrieved from the server.

      Returns:
        allMatchingRowsCached

    - #### allRowsCached

          public boolean allRowsCached()

      Do we have a complete client-side cache of all records for this DataSource?

      Becomes true only when the ResultSet obtains a complete cache after a fetch with empty criteria.

      Returns:
        allRowsCached

    - #### getValueMap

          public java.util.Map getValueMap(java.lang.String idField,
                                  java.lang.String displayField)

      Get a map of the form `{ item[idField] -> item[displayField] }`, for all items in the list. If more than one item has the same `idProperty`, the value for the later item in the list will clobber the value for the earlier item.

      If this method is called when the `allMatchingRowsCached()`, it will trigger fetches, and will return a valueMap reflecting only the currently loaded rows.

      Overrides:
        `getValueMap` in class `RecordList`
      Parameters:
        `idField` - Property to use as ID (data value) in the valueMap
        `displayField` - Property to use a display value in the valueMap
      Returns:
        valueMap object

    - #### getLength

          public int getLength()

      Return the total number of records that match the current filter criteria.

      This length can only be known, even approximately, when the first results are retrieved from the server. Before then, the ResultSet returns a large length in order to encourage viewers to ask for rows. `lengthIsKnown()` can be called to determine whether an actual length is known.

      Overrides:
        `getLength` in class `RecordList`
      Returns:
        number of items in the list

    - #### indexOf

          public int indexOf(Record record)

      Return the position in the list of the first instance of the specified object.

      If pos is specified, starts looking after that position.

      Returns -1 if not found.

      NOTE: ResultSet.indexOf() only inspects the current cache of records, so it is only appropriate for temporary presentation purposes. For example, it would not be appropriate to hold onto a record and attempt to use indexOf() to determine if it had been deleted.

      Overrides:
        `indexOf` in class `RecordList`
      Parameters:
        `record` - object to look for
      Returns:
        position of the item, if found, -1 if not found

    - #### indexOf

          public int indexOf(Record record,
                    int pos,
                    int endPos)

      Return the position in the list of the first instance of the specified object.

      If pos is specified, starts looking after that position.

      Returns -1 if not found.

      NOTE: ResultSet.indexOf() only inspects the current cache of records, so it is only appropriate for temporary presentation purposes. For example, it would not be appropriate to hold onto a record and attempt to use indexOf() to determine if it had been deleted.

      Overrides:
        `indexOf` in class `RecordList`
      Parameters:
        `record` - object to look for
        `pos` - earliest index to consider
        `endPos` - last index to consider
      Returns:
        position of the item, if found, -1 if not found

    - #### get

          public Record get(int pos)

      Returns the record at the specified position.

      All List access methods of the ResultSet have the semantics described in `getRange()`.

      Overrides:
        `get` in class `RecordList`
      Parameters:
        `pos` - position of the element to get
      Returns:
        whatever's at that position, null if not found

    - #### getRange

          public Record[] getRange(int start,
                          int end)

      Return the items between position start and end, non-inclusive at the end, possibly containing markers for records that haven't loaded yet.

      Calling getRange for records that have not yet loaded will trigger an asynchronous fetch. The returned data will contain the `loading marker` as a placeholder for records being fetched. If any rows needed to be fetched, `dataArrived()` will fire when they arrive.

      Overrides:
        `getRange` in class `RecordList`
      Parameters:
        `start` - start position
        `end` - end position
      Returns:
        subset of the array from start -> end-1

    - #### getRangeAsRecordList

          public RecordList getRangeAsRecordList(int start,
                                        int end)

      Return a RecordList with the items between position start and end, non-inclusive at the end.
      Parameters:
        `start` - start position
        `end` - end position
      Returns:
        a RecordList containing the items from start -> end-1

    - #### getAllVisibleRows

          public RecordList getAllVisibleRows()

      Returns a list of the currently visible data, that is, all rows that match the current criteria, with null entries or `loading markers` for rows that are not yet loaded or in the process of loading, respectively.

      This method will not trigger a fetch to load more records. getAllVisibileRows() will return null if `lengthIsKnown()` is false.

      Records are returned in a new List but the Records within it are the same instances that the ResultSet is holding onto. Hence it's safe to add or remove records from the List without affecting the ResultSet but modifying the Records themselves is a direct modification of the client-side cache.

      Returns:
        the records in the cache that match the current criteria, possibly null

    - #### usingFilteredData

          public java.lang.Boolean usingFilteredData()

      Determine whether the ResultSet is showing a filtered, proper subset of the cached rows. This happens if `client filtering` is enabled. Rows may have been loaded from the server when a more restrictive criteria is applied such that filtering could be performed on the client side.

      This method returns false if data is not loaded yet.

      Returns:
        true if the ResultSet is showing a filtered subset of the cached rows, false otherwise.
      See Also:
        `getAllCachedRows()`

    - #### getAllCachedRows

          public RecordList getAllCachedRows()

      Returns a list of all rows that have been cached. This is potentially a superset of all rows that are available via `getAllVisibleRows()` if the ResultSet is using client-side filtering to display a subset of loaded rows (see the `ResultSet overview`).

      If `usingFilteredData()` returns false, this is the same list as would be returned by `getAllVisibleRows()`.

      This method will not trigger a fetch to load more records. getAllCachedRows() will return null if `lengthIsKnown()` is false.

      Records are returned in a new List but the Records within it are the same instances that the ResultSet is holding onto. Hence it's safe to add or remove records from the List without affecting the ResultSet but modifying the Records themselves is a direct modification of the client-side cache.

      Returns:
        the records in the cache, possibly null

    - #### lengthIsKnown

          public java.lang.Boolean lengthIsKnown()

      Whether the ResultSet actually knows how many records are available from the server. The ResultSet will not know how many records are available when initially fetching and filtering data. Note that the value returned from `getLength()` will be an arbitrary, large value if the actual length is not known.
      Returns:
        whether length is known

    - #### rowIsLoaded

          public java.lang.Boolean rowIsLoaded(int rowNum)

      Whether the given row has been loaded.

      Unlike get(), will not trigger a server fetch.

      Parameters:
        `rowNum` - row to check
      Returns:
        true whether if the given row has been loaded, false if it has not been loaded or is still in the process of bring loaded

    - #### rangeIsLoaded

          public java.lang.Boolean rangeIsLoaded(int startRow,
                                        int endRow)

      Whether the given range of rows has been loaded. Unlike getRange(), will not trigger a server fetch.
      Parameters:
        `startRow` - start position, inclusive
        `endRow` - end position, exclusive
      Returns:
        true if all rows in the given range have been loaded, false if any rows in the range have not been loaded or are still in the process of being loaded

    - #### findByKey

          public Record findByKey(java.lang.String keyValue)

      Attempt to find the record in the resultSet that has a primary key value that matches the passed in parameter value. Only the locally cached data will be searched. Checks only loaded rows and will not trigger a fetch. Returns null if there is no match, data is not loaded, or there is no `'dataSource'`.
      Parameters:
        `keyValue` - primary key value to search for
      Returns:
        the record with a matching primary key field, or null if not found

    - #### compareCriteria

          public int compareCriteria(Criteria newCriteria,
                            Criteria oldCriteria)

      Default behavior is to call `DataSource.compareCriteria(com.smartgwt.client.data.Criteria, com.smartgwt.client.data.Criteria)` to determine whether new criteria is guaranteed more restrictive, equivalent to the old criteria, or not guaranteed more restrictive, returning 1, 0 or -1 respectively.

      Override this method or `DataSource.compareCriteria(com.smartgwt.client.data.Criteria, com.smartgwt.client.data.Criteria)` to implement your own client-side filtering behavior.

      Parameters:
        `newCriteria` - new filter criteria
        `oldCriteria` - old filter criteria
      Returns:
        0 if the filters are equivalent, 1 if newFilter is guaranteed more restrictive, and -1 if newFilter is not guaranteed more restrictive

    - #### compareCriteria

          public int compareCriteria(Criteria newCriteria,
                            Criteria oldCriteria,
                            DSRequest requestProperties,
                            java.lang.String policy)

      Default behavior is to call `DataSource.compareCriteria(com.smartgwt.client.data.Criteria, com.smartgwt.client.data.Criteria)` to determine whether new criteria is guaranteed more restrictive, equivalent to the old criteria, or not guaranteed more restrictive, returning 1, 0 or -1 respectively.

      Override this method or `DataSource.compareCriteria(com.smartgwt.client.data.Criteria, com.smartgwt.client.data.Criteria)` to implement your own client-side filtering behavior.

      Parameters:
        `newCriteria` - new filter criteria
        `oldCriteria` - old filter criteria
        `requestProperties` - dataSource request properties
        `policy` - overrides `CriteriaPolicy`
      Returns:
        0 if the filters are equivalent, 1 if newFilter is guaranteed more restrictive, and -1 if newFilter is not guaranteed more restrictive

    - #### willFetchData

          public java.lang.Boolean willFetchData(Criteria newCriteria)

      Will changing the criteria for this resultSet require fetching new data from the server, or can the new criteria be satisfied from data already cached on the client?
      Second `textMatchStyle` parameter determines whether a change of text-match style will require a server fetch - for example if filter is being changed between an exact match (from e.g: `ListGrid.fetchData()`) and a substring match (from e.g: `ListGrid.filterData()`).
      This method can be used to determine whether `ListGrid.fetchData()` or `ListGrid.filterData()` would cause a server side fetch when passed a certain set of criteria.
      Parameters:
        `newCriteria` - new criteria to test.
      Returns:
        true if server fetch would be required to satisfy new criteria.

    - #### willFetchData

          public java.lang.Boolean willFetchData(Criteria newCriteria,
                                        java.lang.String textMatchStyle)

      Will changing the criteria for this resultSet require fetching new data from the server, or can the new criteria be satisfied from data already cached on the client?
      Second `textMatchStyle` parameter determines whether a change of text-match style will require a server fetch - for example if filter is being changed between an exact match (from e.g: `ListGrid.fetchData()`) and a substring match (from e.g: `ListGrid.filterData()`).
      This method can be used to determine whether `ListGrid.fetchData()` or `ListGrid.filterData()` would cause a server side fetch when passed a certain set of criteria.
      Parameters:
        `newCriteria` - new criteria to test.
        `textMatchStyle` - New text match style. If not passed assumes textMatchStyle will not be modified.
      Returns:
        true if server fetch would be required to satisfy new criteria.

    - #### filterLocalData

          public void filterLocalData()

      Derive the current filtered set of data from the cache of all matching rows.

      This method is automatically called by `setCriteria(com.smartgwt.client.data.Criteria)` when criteria have actually changed, as well as in various other situations. You could only need to call this method directly if:

      - you know that client-side filtering is enabled (`useClientFiltering`:true) and active `allMatchingRowsCached()`.
      - you have directly, programmatically modified data within the ResultSet such that it no longer matches the filter criteria
      - you want your modified records to disappear from the list of visible records (that is, those accesible via `get(int)`)

    - #### invalidateCache

          public void invalidateCache()

      Manually invalidate this ResultSet's cache.

      Generally a ResultSet will observe and incorporate updates to the DataSource that provides it's records, but when this is not possible, `invalidateCache()` allows manual cache invalidation.

      `invalidateCache()` fires `dataChanged()`, which may cause components which as using this ResultSet to request new data for display, triggering server fetches.

    - #### dataArrived

          public void dataArrived(int startRow,
                         int endRow)

      Notification fired when data has arrived from the server and has been successfully integrated into the cache.

      When `dataArrived()` fires, an immediate call to `getRange()` with the `startRow` and `endRow` passed as arguments will return a List with no `loading markers`.

      Parameters:
        `startRow` - starting index of rows that have just loaded
        `endRow` - ending index of rows that have just loaded, non-inclusive

    - #### findAll

          public Record[] findAll(java.util.Map properties)

      Checks only loaded rows and will not trigger a fetch.
      Overrides:
        `findAll` in class `RecordList`
      Parameters:
        `properties` - set of properties and values to match
      Returns:
        all matching Records or null if none found

    - #### findAll

          public Record[] findAll(java.lang.String propertyName,
                         java.lang.String value)

      Checks only loaded rows and will not trigger a fetch.
      Overrides:
        `findAll` in class `RecordList`
      Parameters:
        `propertyName` - property to match
        `value` - value to compare against (if propertyName is a string)
      Returns:
        all matching Objects or null if none found

    - #### findAll

          public Record[] findAll(java.lang.String propertyName,
                         int value)

      Checks only loaded rows and will not trigger a fetch.
      Overrides:
        `findAll` in class `RecordList`
      Parameters:
        `propertyName` - property to match
        `value` - value to compare against (if propertyName is a string)
      Returns:
        all matching Objects or null if none found

    - #### findAll

          public Record[] findAll(java.lang.String propertyName,
                         java.lang.Long value)

      Checks only loaded rows and will not trigger a fetch.

      Note: JavaScript has no long type, so the long value becomes a JavaScript Number, which has a lesser range than Java long. The range for integer numbers in Javascript is [-9007199254740992,9007199254740992] or [-Math.pow(2,53),Math.pow(2,53)].

      Overrides:
        `findAll` in class `RecordList`
      Parameters:
        `propertyName` - property to match
        `value` - value to compare against (if propertyName is a string)
      Returns:
        all matching Objects or null if none found

    - #### findAll

          public Record[] findAll(java.lang.String propertyName,
                         float value)

      Checks only loaded rows and will not trigger a fetch.
      Overrides:
        `findAll` in class `RecordList`
      Parameters:
        `propertyName` - property to match
        `value` - value to compare against (if propertyName is a string)
      Returns:
        all matching Objects or null if none found

    - #### findAll

          public Record[] findAll(java.lang.String propertyName,
                         boolean value)

      Checks only loaded rows and will not trigger a fetch.
      Overrides:
        `findAll` in class `RecordList`
      Parameters:
        `propertyName` - property to match
        `value` - value to compare against (if propertyName is a string)
      Returns:
        all matching Objects or null if none found

    - #### findAll

          public Record[] findAll(java.lang.String propertyName,
                         java.util.Date value)

      Find all objects where property == value in the object.
      Overrides:
        `findAll` in class `RecordList`
      Parameters:
        `propertyName` - property to match
        `value` - value to compare against (if propertyName is a string)
      Returns:
        all matching Objects or null if none found

    - #### find

          public Record find(java.util.Map properties)

      Checks only loaded rows and will not trigger a fetch.
      Parameters:
        `properties` - set of properties and values to match
      Returns:
        first matching object or null if not found

    - #### find

          public Record find(java.lang.String propertyName,
                    java.lang.Object value)

      Like `RecordList.find(java.lang.String, java.lang.Object)`. Checks only loaded rows and will not trigger a fetch.
      Overrides:
        `find` in class `RecordList`
      Parameters:
        `propertyName` - property to match
        `value` - value to compare against (if propertyName is a string)
      Returns:
        first matching object or null if not found

    - #### findIndex

          public int findIndex(java.util.Map properties)

      Like `RecordList.findIndex(java.util.Map)`. Checks only loaded rows and will not trigger a fetch.
      Overrides:
        `findIndex` in class `RecordList`
      Parameters:
        `properties` - set of properties and values to match
      Returns:
        index of the first matching Record or -1 if not found

    - #### findIndex

          public int findIndex(java.lang.String propertyName,
                      java.lang.String value)

      Like `RecordList.findIndex(java.util.Map)`. Checks only loaded rows and will not trigger a fetch.
      Overrides:
        `findIndex` in class `RecordList`
      Parameters:
        `propertyName` - property to match
        `value` - value to compare against
      Returns:
        index of the first matching Record or -1 if not found

    - #### findIndex

          public int findIndex(java.lang.String propertyName,
                      int value)

      Like `RecordList.findIndex(java.util.Map)`. Checks only loaded rows and will not trigger a fetch.
      Overrides:
        `findIndex` in class `RecordList`
      Parameters:
        `propertyName` - property to match
        `value` - value to compare against
      Returns:
        index of the first matching Record or -1 if not found

    - #### findIndex

          public int findIndex(java.lang.String propertyName,
                      java.lang.Long value)

      Like `RecordList.findIndex(java.util.Map)`. Checks only loaded rows and will not trigger a fetch.

      Note: JavaScript has no long type, so the long value becomes a JavaScript Number, which has a lesser range than Java long. The range for integer numbers in Javascript is [-9007199254740992,9007199254740992] or [-Math.pow(2,53),Math.pow(2,53)].

      Overrides:
        `findIndex` in class `RecordList`
      Parameters:
        `propertyName` - property to match
        `value` - value to compare against
      Returns:
        index of the first matching Record or -1 if not found

    - #### findIndex

          public int findIndex(java.lang.String propertyName,
                      float value)

      Like `RecordList.findIndex(java.util.Map)`. Checks only loaded rows and will not trigger a fetch.
      Overrides:
        `findIndex` in class `RecordList`
      Parameters:
        `propertyName` - property to match
        `value` - value to compare against
      Returns:
        index of the first matching Record or -1 if not found

    - #### findIndex

          public int findIndex(java.lang.String propertyName,
                      boolean value)

      Like `RecordList.findIndex(java.util.Map)`. Checks only loaded rows and will not trigger a fetch.
      Overrides:
        `findIndex` in class `RecordList`
      Parameters:
        `propertyName` - property to match
        `value` - value to compare against
      Returns:
        index of the first matching Record or -1 if not found

    - #### findIndex

          public int findIndex(java.lang.String propertyName,
                      java.util.Date value)

      Like `RecordList.findIndex(java.util.Map)`. Checks only loaded rows and will not trigger a fetch.
      Overrides:
        `findIndex` in class `RecordList`
      Parameters:
        `propertyName` - property to match
        `value` - value to compare against
      Returns:
        index of the first matching Record or -1 if not found

    - #### findNextIndex

          public int findNextIndex(int startIndex,
                          java.lang.String propertyName)

      Like `RecordList.findNextIndex(int, java.lang.String)`. Checks only loaded rows and will not trigger a fetch.
      Overrides:
        `findNextIndex` in class `RecordList`
      Parameters:
        `startIndex` - first index to consider
        `propertyName` - property to match
      Returns:
        index of the first matching Record or -1 if not found

    - #### findNextIndex

          public int findNextIndex(int startIndex,
                          java.util.Map properties)

      Like `RecordList.findNextIndex(int, java.lang.String)`. Checks only loaded rows and will not trigger a fetch.
      Overrides:
        `findNextIndex` in class `RecordList`
      Parameters:
        `startIndex` - first index to consider
        `properties` - set of properties and values to match
      Returns:
        index of the first matching Record or -1 if not found

    - #### findNextIndex

          public int findNextIndex(int startIndex,
                          java.lang.String propertyName,
                          java.lang.String value,
                          int endIndex)

      Like `RecordList.findNextIndex(int, java.lang.String)`. Checks only loaded rows and will not trigger a fetch.
      Overrides:
        `findNextIndex` in class `RecordList`
      Parameters:
        `startIndex` - first index to consider
        `propertyName` - property to match
        `value` - value to compare against (if propertyName is a string)
        `endIndex` - last index to consider
      Returns:
        index of the first matching Record or -1 if not found

    - #### findNextIndex

          public int findNextIndex(int startIndex,
                          java.lang.String propertyName,
                          int value,
                          int endIndex)

      Like `RecordList.findNextIndex(int, java.lang.String)`. Checks only loaded rows and will not trigger a fetch.
      Overrides:
        `findNextIndex` in class `RecordList`
      Parameters:
        `startIndex` - first index to consider
        `propertyName` - property to match
        `value` - value to compare against (if propertyName is a string)
        `endIndex` - last index to consider
      Returns:
        index of the first matching Record or -1 if not found

    - #### findNextIndex

          public int findNextIndex(int startIndex,
                          java.lang.String propertyName,
                          java.lang.Long value,
                          int endIndex)

      Like `RecordList.findNextIndex(int, java.lang.String)`. Checks only loaded rows and will not trigger a fetch.

      Note: JavaScript has no long type, so the long value becomes a JavaScript Number, which has a lesser range than Java long. The range for integer numbers in Javascript is [-9007199254740992,9007199254740992] or [-Math.pow(2,53),Math.pow(2,53)].

      Overrides:
        `findNextIndex` in class `RecordList`
      Parameters:
        `startIndex` - first index to consider
        `propertyName` - property to match
        `value` - value to compare against (if propertyName is a string)
        `endIndex` - last index to consider
      Returns:
        index of the first matching Record or -1 if not found

    - #### findNextIndex

          public int findNextIndex(int startIndex,
                          java.lang.String propertyName,
                          float value,
                          int endIndex)

      Like `RecordList.findNextIndex(int, java.lang.String)`. Checks only loaded rows and will not trigger a fetch.
      Overrides:
        `findNextIndex` in class `RecordList`
      Parameters:
        `startIndex` - first index to consider
        `propertyName` - property to match
        `value` - value to compare against (if propertyName is a string)
        `endIndex` - last index to consider
      Returns:
        index of the first matching Record or -1 if not found

    - #### findNextIndex

          public int findNextIndex(int startIndex,
                          java.lang.String propertyName,
                          boolean value,
                          int endIndex)

      Like `RecordList.findNextIndex(int, java.lang.String)`. Checks only loaded rows and will not trigger a fetch.
      Overrides:
        `findNextIndex` in class `RecordList`
      Parameters:
        `startIndex` - first index to consider
        `propertyName` - property to match
        `value` - value to compare against (if propertyName is a string)
        `endIndex` - last index to consider
      Returns:
        index of the first matching Record or -1 if not found

    - #### findNextIndex

          public int findNextIndex(int startIndex,
                          java.lang.String propertyName,
                          java.util.Date value,
                          int endIndex)

      Like `RecordList.findNextIndex(int, java.lang.String)`. Checks only loaded rows and will not trigger a fetch.
      Overrides:
        `findNextIndex` in class `RecordList`
      Parameters:
        `startIndex` - first index to consider
        `propertyName` - property to match
        `value` - value to compare against (if propertyName is a string)
        `endIndex` - last index to consider
      Returns:
        index of the first matching Record or -1 if not found

    - #### addDataArrivedHandler

          public HandlerRegistration addDataArrivedHandler(DataArrivedHandler handler)

      Add a dataArrived handler.

      Notification fired when data has arrived from the server and has been successfully integrated into the cache.

      When `dataArrived()` fires, an immediate call to `getRange()` with the `startRow` and `endRow` passed as arguments will return a List with no `loading markers`.

      Specified by:
        `addDataArrivedHandler` in interface `HasDataArrivedHandlers`
      Parameters:
        `handler` - the dataArrived handler
      Returns:
        `HandlerRegistration` used to remove this handler

    - #### isResultSet

          public static boolean isResultSet(JavaScriptObject data)

    - #### getLoadingMarker

          public static Record getLoadingMarker()

      Returns the singleton marker object that is used as a placeholder for records that are being loaded from the server.
      Returns:
        the loading marker