T - the generic type of the Model for the DataProvider.S - the generic type for the SortState.public class AbstractSortableDataProvider<T extends Serializable,S extends Serializable> extends Object implements org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider<T,S>
AbstractSortableDataProvider.| Constructor and Description |
|---|
AbstractSortableDataProvider()
Instantiates a new
AbstractSortableDataProvider. |
AbstractSortableDataProvider(List<T> data)
Instantiates a new
AbstractSortableDataProvider. |
| Modifier and Type | Method and Description |
|---|---|
void |
detach() |
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. |
public AbstractSortableDataProvider()
AbstractSortableDataProvider.public AbstractSortableDataProvider(List<T> data)
AbstractSortableDataProvider.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.IDetachablepublic 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.