Class AppendableDataProviderAdapter<T,S>

java.lang.Object
com.inmethod.grid.DataProviderAdapter<T,S>
com.inmethod.grid.AppendableDataProviderAdapter<T,S>
All Implemented Interfaces:
IAppendableDataSource<T>, IDataSource<T>, Serializable, IDetachable, IClusterable

public class AppendableDataProviderAdapter<T,S> extends DataProviderAdapter<T,S> implements IAppendableDataSource<T>
extends the functionality of DataProviderAdapter to make @{link IDataProvider} instances Appendable
Author:
Tom Burton
See Also:
  • Constructor Details

    • AppendableDataProviderAdapter

      public AppendableDataProviderAdapter(IDataProvider<T> dataProvider)
  • Method Details

    • insertRow

      public void insertRow(long index, T item)
      Description copied from interface: IAppendableDataSource
      Function for appending an item to the end of the result data
      Specified by:
      insertRow in interface IAppendableDataSource<T>
      Parameters:
      index - the index value to insert the new Item into
      item - Item to append to the end of the result data
    • deleteRow

      public void deleteRow(long index, T item)
      Description copied from interface: IAppendableDataSource
      Function for deleting an item from the specified index of the result data
      Specified by:
      deleteRow in interface IAppendableDataSource<T>
      Parameters:
      index - the index value to delete the Item from
      item - Item to be deleted
    • query

      public void query(IDataSource.IQuery query, IDataSource.IQueryResult<T> result)
      Description copied from class: DataProviderAdapter
      Implementation of this method should load subset of the data specified by query.getFrom() and query.getCount(). Also if the total item count can be determined, it should be passed to result.
      Specified by:
      query in interface IDataSource<T>
      Overrides:
      query in class DataProviderAdapter<T,S>
      Parameters:
      query - Specified the amount and position of items to be queried
      result - Allows to set the total item count and result items