public class SortableContactDataProvider extends SortableDataProvider<Contact,String> implements IFilterStateLocator<ContactFilter>
Constructor and Description |
---|
SortableContactDataProvider()
constructor
|
Modifier and Type | Method and Description |
---|---|
protected ContactsDatabase |
getContactsDB() |
ContactFilter |
getFilterState() |
Iterator<Contact> |
iterator(long first,
long count)
Gets an iterator for the subset of total data
|
IModel<Contact> |
model(Contact object)
Callback used by the consumer of this data provider to wrap objects retrieved from
IDataProvider.iterator(long, long) with a model (usually a detachable one). |
void |
setFilterState(ContactFilter state)
Setter for the filter state object
|
long |
size()
Gets total number of items in the collection represented by the DataProvider
|
getSort, getSortState, setSort, setSort
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
detach
protected ContactsDatabase getContactsDB()
public Iterator<Contact> iterator(long first, long count)
IDataProvider
iterator
in interface IDataProvider<Contact>
first
- first row of datacount
- minimum number of elements to retrievepublic long size()
IDataProvider
size
in interface IDataProvider<Contact>
public IModel<Contact> model(Contact object)
IDataProvider
IDataProvider.iterator(long, long)
with a model (usually a detachable one).model
in interface IDataProvider<Contact>
object
- the object that needs to be wrappedpublic ContactFilter getFilterState()
getFilterState
in interface IFilterStateLocator<ContactFilter>
public void setFilterState(ContactFilter state)
IFilterStateLocator
setFilterState
in interface IFilterStateLocator<ContactFilter>
state
- filter state objectCopyright © 2006–2022 Apache Software Foundation. All rights reserved.