public abstract class ServiceBackedDataModel<T,R> extends Object implements DataModel<T>
| Constructor and Description |
|---|
ServiceBackedDataModel() |
| Modifier and Type | Method and Description |
|---|---|
void |
appendItem(T item)
Appends an item to an already loaded model.
|
void |
doFetchRows(int start,
int count,
AsyncCallback<List<T>> callback)
Perform a paged data request for the given number of items at the given offset into the
result set.
|
int |
getItemCount()
Returns the total number of items in this model.
|
void |
prependItem(T item)
Prepends an item to an already loaded model.
|
void |
removeItem(T item)
Called when we wish to remove an item from our locally cached data.
|
void |
reset()
Clears out any cached data and resets the model to total blankness.
|
public void prependItem(T item)
public void appendItem(T item)
public void reset()
public int getItemCount()
DataModelDataModel.doFetchRows(int, int, com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<T>>) is called back. You may also return -1 to indicate
that this model does not supply a row count, and the pager should continue offering pages
for as long as the underlying service is able to satisfy the requests.getItemCount in interface DataModel<T>public void removeItem(T item)
DataModelremoveItem in interface DataModel<T>public void doFetchRows(int start,
int count,
AsyncCallback<List<T>> callback)
DataModeldoFetchRows in interface DataModel<T>Copyright © 2013. All Rights Reserved.