|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - the persistence entity class that this DAO will handleK - the class of T's id propertypublic interface HibernateDAO<T,K extends Serializable>
| Method Summary | |
|---|---|
boolean |
delete(K key)
Used by the base DAO classes but here for your modification. |
void |
evict(T obj)
Remove the given object from the Session cache. |
List<T> |
find(List<? extends org.hibernate.criterion.Criterion> criteria,
org.hibernate.criterion.Order... orders)
Retrieve the entities handled by this DAO that match the input criteria, ordered according to the
input orders. |
List<T> |
find(String query)
Retrieve all entities handled by this DAO that match the input query string. |
List<T> |
find(String query,
Object[] paramValues,
org.hibernate.type.Type[] paramTypes)
Retrieve all entities handled by this DAO that match the input query string, accepting one query parameter and the corresponding type. |
List<T> |
find(String query,
Object paramValue,
org.hibernate.type.Type paramType)
Retrieve all entities handled by this DAO that match the input query string, accepting one query parameter and the corresponding type. |
List<T> |
findAll()
Retrieve all entities handled by this DAO, in no particular order. |
List<T> |
findAll(org.hibernate.criterion.Order... orders)
Retrieve all entities handled by this DAO, ordered according to the input orders. |
List<T> |
findAll(org.hibernate.criterion.Order[] orderProperties,
List<? extends org.hibernate.criterion.Criterion> criteria)
Deprecated. use the correctly named #find(Order[], List) instead |
List<T> |
findFiltered(T filter)
Retrieve the entities handled by this DAO whose property values match, via equals(),
filter's non-null property values. |
List<T> |
findFiltered(T filter,
int maxResults,
int page)
Retrieve the entities handled by this DAO whose property values match, via equals(),
filter's non-null property values. |
List<T> |
findFiltered(T filter,
Map<String,? extends FilterMetadata> metadata)
Retrieve the entities handled by this DAO whose property values match, via equals() or via a
specified FilterMetadata object, filter's non-null property values. |
List<T> |
findFiltered(T filter,
Map<String,? extends FilterMetadata> metadata,
int maxResults,
int page)
Retrieve the entities handled by this DAO whose property values match, via equals() or via a
specified FilterMetadata object, filter's non-null property values. |
List<T> |
findFiltered(T filter,
Map<String,? extends FilterMetadata> metadata,
int maxResults,
int page,
List<? extends org.hibernate.criterion.Criterion> criteria,
org.hibernate.criterion.Order... orders)
Retrieve the entities handled by this DAO whose property values match, via equals() or via a
specified FilterMetadata object, filter's non-null property values, and the input
criteria. |
List<T> |
findFiltered(T filter,
Map<String,? extends FilterMetadata> metadata,
int maxResults,
int page,
org.hibernate.criterion.Order... orders)
Retrieve the entities handled by this DAO whose property values match, via equals() or via a
specified FilterMetadata object, filter's non-null property values. |
List<T> |
findFiltered(T filter,
org.hibernate.criterion.Order... orders)
Retrieve the entities handled by this DAO whose property values match, via equals(),
filter's non-null property values. |
List<T> |
findFiltered(T filter,
org.hibernate.criterion.Order[] orders,
Map<String,? extends FilterMetadata> metadata,
int maxResults,
int page)
Deprecated. superseded by findFiltered(Object, Map, int, int, Order...) |
List<T> |
findFiltered(T filter,
org.hibernate.criterion.Order[] orders,
Map<String,? extends FilterMetadata> metadata,
int maxResults,
int page,
List<? extends org.hibernate.criterion.Criterion> criteria)
Deprecated. superseded by findFiltered(Object, Map, int, int, List, Order...) |
T |
findFilteredFirst(T filter)
Retrieve the first entity instance that matches the input filter, if existing. |
T |
findFilteredFirst(T filter,
List<? extends org.hibernate.criterion.Criterion> criteria)
Retrieve the first entity instance that matches the input filter and the additional input
criteria, if existing. |
T |
findFilteredFirst(T filter,
org.hibernate.criterion.Order... orders)
Retrieve the first entity instance that matches the input filter, if existing. |
List<?> |
findFilteredProperties(T filter,
Map<String,? extends FilterMetadata> metadata,
int maxResults,
int page,
List<? extends org.hibernate.criterion.Criterion> criteria,
List<String> properties,
org.hibernate.criterion.Order... orders)
Retrieve a set of properties from the entities returned by findFiltered(Object, Order[], Map, int, int, List) |
List<?> |
findFilteredProperties(T filter,
org.hibernate.criterion.Order[] orders,
Map<String,? extends FilterMetadata> metadata,
int maxResults,
int page,
List<? extends org.hibernate.criterion.Criterion> criteria,
List<String> properties)
Deprecated. superseded by findFilteredProperties(Object, Map, int, int, List, List, Order...) |
T |
get(K key)
Load object matching the given key and return it. |
T |
load(K key)
Load object matching the given key and return it. |
T |
loadIfAvailable(K key)
Load object matching the given key and return it. |
T |
merge(T obj)
Copies the state of the given object onto the persistent object with the same identifier, and returns the updated persistent instance. |
void |
refresh(T obj)
Re-reads the state of the given instance from the underlying database. |
K |
save(T obj)
Persist the given transient instance, first assigning a generated identifier. |
void |
saveOrUpdate(T obj)
Used by the base DAO classes but here for your modification Either save() or update() the given instance, depending upon the value of its identifier property. |
void |
update(T obj)
Used by the base DAO classes but here for your modification Update the persistent state associated with the given identifier. |
| Method Detail |
|---|
List<T> findAll()
List<T> findAll(org.hibernate.criterion.Order... orders)
orders.
orders - the orders to apply with respect to entity class properties
List<T> find(String query)
query - an HQL query
List<T> find(String query,
Object paramValue,
org.hibernate.type.Type paramType)
query - an HQL queryparamValue - the value of a parameter to be set in the queryparamType - the Hibernate type of paramValue
List<T> find(String query,
Object[] paramValues,
org.hibernate.type.Type[] paramTypes)
query - an HQL queryparamValues - the parameter values to be set in the queryparamTypes - the Hibernate types of paramValues
List<T> find(List<? extends org.hibernate.criterion.Criterion> criteria,
org.hibernate.criterion.Order... orders)
criteria, ordered according to the
input orders.
criteria - a list of additional Hibernate criteriaorders - the orders to apply with respect to entity class properties
List<T> findFiltered(T filter)
equals(),
filter's non-null property values.
filter - an instance of this DAO's entity class to be used as filter
List<T> findFiltered(T filter,
org.hibernate.criterion.Order... orders)
equals(),
filter's non-null property values. The result list is ordered according to the input
orders parameter.
filter - an instance of this DAO's entity class to be used as filterorders - the orders to apply with respect to entity class properties
List<T> findFiltered(T filter,
int maxResults,
int page)
equals(),
filter's non-null property values.
filter - an instance of this DAO's entity class to be used as filtermaxResults - the maximum number of results to be fetchedpage - the zero-based page number to use when displaying paginated results (the first entity returned is the
one at position maxResults * page in the complete list of results), or 0 for no
pagination
List<T> findFiltered(T filter,
Map<String,? extends FilterMetadata> metadata)
equals() or via a
specified FilterMetadata object, filter's non-null property values.
filter - an instance of this DAO's entity class to be used as filtermetadata - a map that matches names of entity class properties to FilterMetadata modifiers,
that will be used for comparing values of the corresponding property
List<T> findFiltered(T filter,
Map<String,? extends FilterMetadata> metadata,
int maxResults,
int page)
equals() or via a
specified FilterMetadata object, filter's non-null property values.
filter - an instance of this DAO's entity class to be used as filtermetadata - a map that matches names of entity class properties to FilterMetadata modifiers,
that will be used for comparing values of the corresponding propertymaxResults - the maximum number of results to be fetchedpage - the zero-based page number to use when displaying paginated results (the first entity returned is the
one at position maxResults * page in the complete list of results), or 0 for no
pagination
List<T> findFiltered(T filter,
Map<String,? extends FilterMetadata> metadata,
int maxResults,
int page,
org.hibernate.criterion.Order... orders)
equals() or via a
specified FilterMetadata object, filter's non-null property values. The result list is
ordered according to the orders parameter.
filter - an instance of this DAO's entity class to be used as filtermetadata - a map that matches names of entity class properties to FilterMetadata modifiers,
that will be used for comparing values of the corresponding propertymaxResults - the maximum number of results to be fetchedpage - the zero-based page number to use when displaying paginated results (the first entity returned is the
one at position maxResults * page in the complete list of results), or 0 for no
paginationorders - the orders to apply with respect to entity class properties
List<T> findFiltered(T filter,
Map<String,? extends FilterMetadata> metadata,
int maxResults,
int page,
List<? extends org.hibernate.criterion.Criterion> criteria,
org.hibernate.criterion.Order... orders)
equals() or via a
specified FilterMetadata object, filter's non-null property values, and the input
criteria.
filter - an instance of this DAO's entity class to be used as filtermetadata - a map that matches names of entity class properties to FilterMetadata modifiers,
that will be used for comparing values of the corresponding propertymaxResults - the maximum number of results to be fetchedpage - the zero-based page number to use when displaying paginated results (the first entity returned is the
one at position maxResults * page in the complete list of results), or 0 for no
paginationcriteria - a list of additional Hibernate criteriaorders - the orders to apply with respect to entity class properties
List<?> findFilteredProperties(T filter,
Map<String,? extends FilterMetadata> metadata,
int maxResults,
int page,
List<? extends org.hibernate.criterion.Criterion> criteria,
List<String> properties,
org.hibernate.criterion.Order... orders)
findFiltered(Object, Order[], Map, int, int, List)
filter - an instance of this DAO's entity class to be used as filtermetadata - a map that matches names of entity class properties to FilterMetadata modifiers,
that will be used for comparing values of the corresponding propertymaxResults - the maximum number of results to be fetchedpage - the zero-based page number to use when displaying paginated results (the first entity returned is the
one at position maxResults * page in the complete list of results), or 0 for no
paginationcriteria - a list of additional Hibernate criteriaproperties - the names of the properties to returnorders - the orders to apply with respect to entity class properties
T findFilteredFirst(T filter)
filter, if existing.
filter - an instance of this DAO's entity class to be used as filter
null if none found#findFiltered(T)
T findFilteredFirst(T filter,
org.hibernate.criterion.Order... orders)
filter, if existing.
filter - an instance of this DAO's entity class to be used as filterorders - the orders to apply with respect to entity class properties
null if none found#findFiltered(T, Order...)
T findFilteredFirst(T filter,
List<? extends org.hibernate.criterion.Criterion> criteria)
filter and the additional input
criteria, if existing.
filter - an instance of this DAO's entity class to be used as filtercriteria - a list of additional Hibernate criteria
null if none found#findFiltered(T, List)T load(K key)
key - the id of the entity instance to load
T loadIfAvailable(K key)
key - the id of the entity instance to load
T get(K key)
key - the id of the entity instance to load
K save(T obj)
obj - the entity instance to save
void update(T obj)
obj - a transient instance containing updated statevoid saveOrUpdate(T obj)
obj - Objectboolean delete(K key)
key - key
void refresh(T obj)
INSERT or
UPDATE statements
obj - the entity instance to refreshvoid evict(T obj)
obj - the entity instance to removeT merge(T obj)
cascade="merge".
obj - a detached instance with state to be copied
@Deprecated
List<T> findAll(org.hibernate.criterion.Order[] orderProperties,
List<? extends org.hibernate.criterion.Criterion> criteria)
#find(Order[], List) instead
orderProperties - desc or asccriteria - Additional Criterion conditions
@Deprecated
List<T> findFiltered(T filter,
org.hibernate.criterion.Order[] orders,
Map<String,? extends FilterMetadata> metadata,
int maxResults,
int page)
findFiltered(Object, Map, int, int, Order...)
equals() or via a
specified FilterMetadata object, filter's non-null property values. The result list is
ordered according to the orders parameter.
filter - an instance of this DAO's entity class to be used as filterorders - the orders to apply with respect to entity class propertiesmetadata - a map that matches names of entity class properties to FilterMetadata modifiers,
that will be used for comparing values of the corresponding propertymaxResults - the maximum number of results to be fetchedpage - the zero-based page number to use when displaying paginated results (the first entity returned is the
one at position maxResults * page in the complete list of results), or 0 for no
pagination
@Deprecated
List<T> findFiltered(T filter,
org.hibernate.criterion.Order[] orders,
Map<String,? extends FilterMetadata> metadata,
int maxResults,
int page,
List<? extends org.hibernate.criterion.Criterion> criteria)
findFiltered(Object, Map, int, int, List, Order...)
equals() or via a
specified FilterMetadata object, filter's non-null property values, and the input
criteria.
filter - an instance of this DAO's entity class to be used as filterorders - the orders to apply with respect to entity class propertiesmetadata - a map that matches names of entity class properties to FilterMetadata modifiers,
that will be used for comparing values of the corresponding propertymaxResults - the maximum number of results to be fetchedpage - the zero-based page number to use when displaying paginated results (the first entity returned is the
one at position maxResults * page in the complete list of results), or 0 for no
paginationcriteria - a list of additional Hibernate criteria
@Deprecated
List<?> findFilteredProperties(T filter,
org.hibernate.criterion.Order[] orders,
Map<String,? extends FilterMetadata> metadata,
int maxResults,
int page,
List<? extends org.hibernate.criterion.Criterion> criteria,
List<String> properties)
findFilteredProperties(Object, Map, int, int, List, List, Order...)
findFiltered(Object, Order[], Map, int, int, List)
filter - an instance of this DAO's entity class to be used as filterorders - the orders to apply with respect to entity class propertiesmetadata - a map that matches names of entity class properties to FilterMetadata modifiers,
that will be used for comparing values of the corresponding propertymaxResults - the maximum number of results to be fetchedpage - the zero-based page number to use when displaying paginated results (the first entity returned is the
one at position maxResults * page in the complete list of results), or 0 for no
paginationcriteria - a list of additional Hibernate criteriaproperties - the names of the properties to return
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||