public class ProductSortableDataProvider<P extends Product>
extends org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider<P>
Constructor and Description |
---|
ProductSortableDataProvider() |
ProductSortableDataProvider(ProductDao<P> productDao) |
Modifier and Type | Method and Description |
---|---|
Query<P> |
constructQuery(Integer first,
Integer count) |
String |
getDefaultOrderField() |
Query<P> |
getFilter()
Will apply the filter result to remove them from the main result before producing final result.
|
ProductDao |
getProductDao() |
Query<P> |
getQuery()
If Query not set then construct a new one and return a Query
|
Iterator<? extends P> |
iterator(int first,
int count)
Fetch records
Note if first or count < 0 then it will not consider pagination and hence get all records
|
org.apache.wicket.model.IModel<P> |
model(P object) |
void |
reset() |
void |
setDefaultOrderField(String defaultOrderField) |
void |
setFilter(Query<P> filter)
Will apply the filter result to remove them from the main result before producing final result.
|
void |
setJPARawQueries(String rawJPAQueryStr,
Map<String,Object> rawJPAQueryParams)
|
void |
setProductDao(ProductDao productDao) |
void |
setQuery(Query<P> query) |
int |
size() |
public ProductSortableDataProvider()
public ProductSortableDataProvider(ProductDao<P> productDao)
public Query<P> constructQuery(Integer first, Integer count)
first
- as Integer, record number (base = 0)count
- (size of page/# records)public Query<P> getQuery()
@Transactional(readOnly=true) public Iterator<? extends P> iterator(int first, int count)
@Transactional(readOnly=true) public int size()
public ProductDao getProductDao()
public void setProductDao(ProductDao productDao)
public Query<P> getFilter()
public void setFilter(Query<P> filter)
public void setJPARawQueries(String rawJPAQueryStr, Map<String,Object> rawJPAQueryParams)
public void reset()
public String getDefaultOrderField()
public void setDefaultOrderField(String defaultOrderField)
Copyright © 2018. All rights reserved.