public class SearchableHibernateGridDataSource extends Object implements org.apache.tapestry5.grid.GridDataSource
| Constructor and Description |
|---|
SearchableHibernateGridDataSource(org.hibernate.Session session,
Class entityType,
org.hibernate.search.FullTextQuery fullTextQuery,
Map<TynamoPropertyDescriptor,SearchFilterPredicate> propertySearchFilterMap) |
SearchableHibernateGridDataSource(org.hibernate.Session session,
Class entityType,
Map<TynamoPropertyDescriptor,SearchFilterPredicate> propertySearchFilterMap) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyAdditionalConstraints(org.hibernate.Criteria crit)
Invoked after the main criteria has been set up (firstResult, maxResults and any sort contraints).
|
int |
getAvailableRows()
Returns the total number of rows for the configured entity type.
|
Class |
getRowType()
Returns the entity type, as provided via the constructor.
|
Object |
getRowValue(int index)
Returns a row value at the given index (which must be within the range defined by the call to
prepare(int, int, java.util.List) ). |
void |
prepare(int startIndex,
int endIndex,
List<org.apache.tapestry5.grid.SortConstraint> sortConstraints)
Prepares the results, performing a query (applying the sort results, and the provided start and end index).
|
public SearchableHibernateGridDataSource(org.hibernate.Session session,
Class entityType,
Map<TynamoPropertyDescriptor,SearchFilterPredicate> propertySearchFilterMap)
public SearchableHibernateGridDataSource(org.hibernate.Session session,
Class entityType,
org.hibernate.search.FullTextQuery fullTextQuery,
Map<TynamoPropertyDescriptor,SearchFilterPredicate> propertySearchFilterMap)
public int getAvailableRows()
getAvailableRows in interface org.apache.tapestry5.grid.GridDataSourcepublic void prepare(int startIndex,
int endIndex,
List<org.apache.tapestry5.grid.SortConstraint> sortConstraints)
getRowValue(int) }.prepare in interface org.apache.tapestry5.grid.GridDataSourcestartIndex - index, from zero, of the first item to be retrievedendIndex - index, from zero, of the last item to be retrievedsortConstraints - zero or more constraints used to set the order of the returned valuesprotected void applyAdditionalConstraints(org.hibernate.Criteria crit)
public Object getRowValue(int index)
prepare(int, int, java.util.List) ).getRowValue in interface org.apache.tapestry5.grid.GridDataSourceindex - of objectpublic Class getRowType()
getRowType in interface org.apache.tapestry5.grid.GridDataSourceCopyright © 2004-2013. All Rights Reserved.