T - the generic type of the Model for the DataProvider.S - the generic type for the SortState.F - the generic type for the Filter.public abstract class AbstractSortableFilterDataProvider<T extends Serializable,S,F extends Serializable> extends Object implements org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider<T,S>, org.apache.wicket.extensions.markup.html.repeater.data.table.filter.IFilterStateLocator<F>
AbstractSortableFilterDataProvider is an abstract generic implementation for the
ISortableDataProvider and the IFilterStateLocator interface.| Constructor and Description |
|---|
AbstractSortableFilterDataProvider()
Instantiates a new
AbstractSortableFilterDataProvider. |
AbstractSortableFilterDataProvider(List<T> data)
Instantiates a new
AbstractSortableFilterDataProvider. |
| Modifier and Type | Method and Description |
|---|---|
void |
detach() |
protected List<T> |
filter(List<T> found)
Filter the given list.
|
org.apache.wicket.extensions.markup.html.repeater.util.SortParam<S> |
getSort()
Returns current sort state.
|
Iterator<? extends T> |
iterator(long first,
long count) |
org.apache.wicket.model.IModel<T> |
model(T object) |
protected org.apache.wicket.extensions.markup.html.repeater.util.SingleSortState<S> |
newSortState()
Factory method for creating the new
SingleSortState for the sort state. |
void |
setSort(org.apache.wicket.extensions.markup.html.repeater.util.SortParam<S> param)
Sets the current sort state.
|
void |
setSort(S property,
org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder order)
Sets the current sort state.
|
long |
size() |
protected List<T> |
sort()
Sorts the given list by getting the
SortParam.getProperty() and if not null the given
list will be sort. |
protected List<T> |
sort(List<T> unsortedList)
Sorts the given list by getting the
SortParam.getProperty() and if not null the given
list will be sort. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic AbstractSortableFilterDataProvider()
AbstractSortableFilterDataProvider.public AbstractSortableFilterDataProvider(List<T> data)
AbstractSortableFilterDataProvider.data - the dataprotected org.apache.wicket.extensions.markup.html.repeater.util.SingleSortState<S> newSortState()
SingleSortState for the sort state. This method is invoked
in the constructor from the derived classes and can be overridden so users can provide their
own version of a new SingleSortState for the sort state.SingleSortState for the sort state.public void detach()
detach in interface org.apache.wicket.model.IDetachableprotected List<T> filter(List<T> found)
found - the foundpublic org.apache.wicket.extensions.markup.html.repeater.util.SortParam<S> getSort()
public Iterator<? extends T> iterator(long first, long count)
iterator in interface org.apache.wicket.markup.repeater.data.IDataProvider<T extends Serializable>public org.apache.wicket.model.IModel<T> model(T object)
model in interface org.apache.wicket.markup.repeater.data.IDataProvider<T extends Serializable>public void setSort(S property, org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder order)
property - sort propertyorder - sort orderpublic void setSort(org.apache.wicket.extensions.markup.html.repeater.util.SortParam<S> param)
param - parameter containing new sorting informationpublic long size()
size in interface org.apache.wicket.markup.repeater.data.IDataProvider<T extends Serializable>protected List<T> sort()
SortParam.getProperty() and if not null the given
list will be sort.Copyright © 2010–2015 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.