org.wicketopia.model.table
Class SortableCollectionDataProvider<T>
java.lang.Object
org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider<T,String>
org.wicketopia.model.table.SortableCollectionDataProvider<T>
- Type Parameters:
T
- the item type
- All Implemented Interfaces:
- Serializable, org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator<String>, org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider<T,String>, org.apache.wicket.markup.repeater.data.IDataProvider<T>, org.apache.wicket.model.IDetachable, org.apache.wicket.util.io.IClusterable
- Direct Known Subclasses:
- DefaultSortableCollectionDataProvider
public abstract class SortableCollectionDataProvider<T>
- extends org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider<T,String>
Adapts a collection model to be a SortableDataProvider
. Properties which need to support sorting should
be Comparable
.
- Since:
- 1.0
- See Also:
- Serialized Form
Constructor Summary |
SortableCollectionDataProvider(org.apache.wicket.model.IModel<? extends Collection<T>> inner)
Creates a data provider which wraps the provided collection model (no default sorting). |
SortableCollectionDataProvider(String propertyName,
org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder sortOrder,
Collection<T> items)
Creates a data provider which wraps the provided collection using Model.of(java.util.Collection) . |
SortableCollectionDataProvider(String propertyName,
org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder sortOrder,
org.apache.wicket.model.IModel<? extends Collection<? extends T>> inner)
Creates a data provider which wraps the provided collection model. |
Methods inherited from class org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider |
getSort, getSortState, setSort, setSort |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.wicket.markup.repeater.data.IDataProvider |
model |
NO_ORDER
public static final String NO_ORDER
- See Also:
- Constant Field Values
SortableCollectionDataProvider
public SortableCollectionDataProvider(org.apache.wicket.model.IModel<? extends Collection<T>> inner)
- Creates a data provider which wraps the provided collection model (no default sorting).
- Parameters:
inner
- the collection model
SortableCollectionDataProvider
public SortableCollectionDataProvider(String propertyName,
org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder sortOrder,
org.apache.wicket.model.IModel<? extends Collection<? extends T>> inner)
- Creates a data provider which wraps the provided collection model. Items will be sorted by #{propertyName} using
#{sortOrder}.
- Parameters:
propertyName
- the sort propertysortOrder
- the sort orderinner
- the collection model
SortableCollectionDataProvider
public SortableCollectionDataProvider(String propertyName,
org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder sortOrder,
Collection<T> items)
- Creates a data provider which wraps the provided collection using
Model.of(java.util.Collection)
.
- Parameters:
propertyName
- the sort propertysortOrder
- the sort orderitems
- the collection
iterator
public Iterator<? extends T> iterator(long first,
long count)
size
public long size()
detach
public void detach()
- Specified by:
detach
in interface org.apache.wicket.model.IDetachable
- Overrides:
detach
in class org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider<T,String>
Copyright © 2010-2013. All Rights Reserved.