
C - the type of data for the input objectD - the type of data to be returned by the loaderpublic class PagingLoader<C extends PagingLoadConfig,D extends PagingLoadResult<?>> extends ListLoader<C,D>
ListLoader subclass which adds support for paged data (offset,
limit, and total count).| Constructor and Description |
|---|
PagingLoader(DataProxy<C,D> proxy)
Creates a new paging loader instance.
|
PagingLoader(DataProxy<C,T> proxy,
DataReader<D,T> reader)
Creates a new paging loader instance.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getLimit()
Returns the current limit.
|
int |
getOffset()
Returns the offset of the first record.
|
int |
getTotalCount()
Returns the total number of models in the dataset as returned by the
server.
|
void |
load(int offset,
int limit)
Loads the data using the specified configuration.
|
void |
setLimit(int limit)
Sets the limit size.
|
void |
setOffset(int offset)
Sets the offset.
|
void |
useLoadConfig(C loadConfig)
Use the specified LoadConfig for all load calls,
Loader.setReuseLoadConfig(boolean) will be set to true. |
addSortInfo, addSortInfo, clearSortInfo, getSortInfo, isRemoteSort, removeSortInfo, setRemoteSortaddBeforeLoadHandler, addLoaderHandler, addLoadExceptionHandler, addLoadHandler, getLastLoadConfig, getProxy, isReuseLoadConfig, load, load, setReuseLoadConfigpublic PagingLoader(DataProxy<C,D> proxy)
proxy - the data proxypublic PagingLoader(DataProxy<C,T> proxy, DataReader<D,T> reader)
proxy - the data proxyreader - the data readerpublic int getLimit()
public int getOffset()
public int getTotalCount()
public void load(int offset,
int limit)
offset - the offset of the first record to returnlimit - the page sizepublic void setLimit(int limit)
limit - the limitpublic void setOffset(int offset)
offset - the offsetpublic void useLoadConfig(C loadConfig)
Loader.setReuseLoadConfig(boolean) will be set to true.useLoadConfig in class ListLoader<C extends PagingLoadConfig,D extends PagingLoadResult<?>>Copyright © 2015. All rights reserved.