|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.markup.repeater.data.DefaultDataProvider
net.databinder.models.PropertyDataProvider
net.databinder.models.hib.HibernateProvider
public class HibernateProvider
Provides query results to DataView and related components. Like the Hibernate model classes, the results of this provider can be altered by query binders and criteria builders. By default this provider wraps items in a compound property model in addition to a Hibernate model. This is convenient for mapping DataView subcomponents as bean properties (as with PropertyListView). However, DataTable will not work with a compound property model. Call setWrapWithPropertyModel(false) when using with DataTable, DataGridView, or any other time you do not want a compound property model.
| Constructor Summary | |
|---|---|
HibernateProvider(java.lang.Class objectClass)
Provides all entities of the given class. |
|
HibernateProvider(java.lang.Class objectClass,
CriteriaBuilder criteriaBuilder)
Provides entities of the given class meeting the supplied criteria. |
|
HibernateProvider(java.lang.Class objectClass,
CriteriaBuilder criteriaBuilder,
CriteriaBuilder criteriaOrderer)
Provides all entities of the given class using a distinct criteria builder for the order query. |
|
HibernateProvider(java.lang.Class objectClass,
OrderingCriteriaBuilder criteriaBuider)
Provides all entities of the given class. |
|
HibernateProvider(QueryBuilder queryBuilder,
QueryBuilder countQueryBuilder)
|
|
HibernateProvider(java.lang.String query)
Provides entities matching the given query. |
|
HibernateProvider(java.lang.String query,
QueryBinder queryBinder)
Provides entities matching the given query with bound parameters. |
|
HibernateProvider(java.lang.String query,
QueryBinder queryBinder,
java.lang.String countQuery,
QueryBinder countQueryBinder)
Provides entities matching the given queries with bound parameters. |
|
HibernateProvider(java.lang.String query,
java.lang.String countQuery)
Provides entities matching the given queries. |
|
| Method Summary | |
|---|---|
protected org.apache.wicket.model.IModel |
dataModel(java.lang.Object object)
Wrap in appropriate persistent model in subclass |
void |
detach()
does nothing |
java.lang.Object |
getFactoryKey()
|
java.util.Iterator |
iterator(int first,
int count)
It should not normally be necessary to override (or call) this default implementation. |
protected static java.lang.String |
makeCount(java.lang.String query)
|
HibernateProvider |
setFactoryKey(java.lang.Object key)
Set a factory key other than the default (null). |
int |
size()
Only override this method if a single count query or criteria projection is not possible. |
| Methods inherited from class net.databinder.models.PropertyDataProvider |
|---|
model, setWrapWithPropertyModel |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HibernateProvider(java.lang.Class objectClass)
public HibernateProvider(java.lang.Class objectClass,
CriteriaBuilder criteriaBuilder,
CriteriaBuilder criteriaOrderer)
objectClass - criteriaBuilder - base criteria buildercriteriaOrderer - add ordering information ONLY, base criteria will be called first
public HibernateProvider(java.lang.Class objectClass,
OrderingCriteriaBuilder criteriaBuider)
objectClass - criteriaBuider - builds different criteria objects for iterator() and size()
public HibernateProvider(java.lang.Class objectClass,
CriteriaBuilder criteriaBuilder)
public HibernateProvider(java.lang.String query)
public HibernateProvider(java.lang.String query,
java.lang.String countQuery)
public HibernateProvider(java.lang.String query,
QueryBinder queryBinder)
public HibernateProvider(java.lang.String query,
QueryBinder queryBinder,
java.lang.String countQuery,
QueryBinder countQueryBinder)
query - query to return entitiesqueryBinder - binder for the standard querycountQuery - query to return count of entitiescountQueryBinder - binder for the count query (may be same as queryBinder)
public HibernateProvider(QueryBuilder queryBuilder,
QueryBuilder countQueryBuilder)
| Method Detail |
|---|
protected static java.lang.String makeCount(java.lang.String query)
public java.lang.Object getFactoryKey()
public HibernateProvider setFactoryKey(java.lang.Object key)
key - session factory key
public java.util.Iterator iterator(int first,
int count)
public int size()
protected org.apache.wicket.model.IModel dataModel(java.lang.Object object)
PropertyDataProvider
dataModel in class PropertyDataProviderpublic void detach()
detach in interface org.apache.wicket.model.IDetachabledetach in class org.apache.wicket.markup.repeater.data.DefaultDataProvider
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||