org.wicketopia.domdrides.model.repeater
Class PageableRepositoryDataProvider<EntityType extends org.domdrides.entity.Entity<IdType>,IdType extends Serializable>
java.lang.Object
org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider<EntityType,String>
org.wicketopia.domdrides.model.repeater.PageableRepositoryDataProvider<EntityType,IdType>
- 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<EntityType,String>, org.apache.wicket.markup.repeater.data.IDataProvider<EntityType>, org.apache.wicket.model.IDetachable, org.apache.wicket.util.io.IClusterable
public class PageableRepositoryDataProvider<EntityType extends org.domdrides.entity.Entity<IdType>,IdType extends Serializable>
- extends org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider<EntityType,String>
A PageableRepository
-based implementation of IDataProvider
. Each @{Entity} returned by this
data provider will be wrapped with a LoadableDetachableEntityModel
.
- Since:
- 1.1
- See Also:
- Serialized Form
Constructor Summary |
PageableRepositoryDataProvider(org.domdrides.repository.PageableRepository<EntityType,IdType> repository,
String sortProperty)
Constructs a data provider which returns records from the specified PageableRepository sorted by the
specified sort property (ascending) |
PageableRepositoryDataProvider(org.domdrides.repository.PageableRepository<EntityType,IdType> repository,
String sortProperty,
boolean ascending)
Constructs a data provider which returns records from the specified PageableRepository sorted by the
specified sort property. |
Methods inherited from class org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider |
detach, getSort, getSortState, setSort, setSort |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PageableRepositoryDataProvider
public PageableRepositoryDataProvider(org.domdrides.repository.PageableRepository<EntityType,IdType> repository,
String sortProperty)
- Constructs a data provider which returns records from the specified
PageableRepository
sorted by the
specified sort property (ascending)
- Parameters:
repository
- the repositorysortProperty
- the sort property
PageableRepositoryDataProvider
public PageableRepositoryDataProvider(org.domdrides.repository.PageableRepository<EntityType,IdType> repository,
String sortProperty,
boolean ascending)
- Constructs a data provider which returns records from the specified
PageableRepository
sorted by the
specified sort property.
- Parameters:
repository
- the repositorysortProperty
- the sort propertyascending
- whether or not to sort ascending
iterator
public Iterator<? extends EntityType> iterator(long first,
long max)
model
public org.apache.wicket.model.IModel<EntityType> model(EntityType entity)
size
public long size()
Copyright © 2010-2013. All Rights Reserved.