|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Repository
Repository interface, in case the DAO pattern isn't applied.
| Method Summary | ||
|---|---|---|
void |
delete(java.lang.Object entity)
Deletes an entity instance. |
|
|
deleteById(java.lang.Class<T> type,
java.io.Serializable id)
Deletes an entity instance. |
|
void |
evict(java.lang.Object object)
Remove the provided instance from the session cache. |
|
|
findAll(java.lang.Class<T> type)
Returns all entities of the persistent type. |
|
|
findById(java.lang.Class<T> type,
java.io.Serializable id,
boolean lock)
Finds an entity by ID. |
|
|
first(java.lang.Class<T> type,
org.hibernate.Query query)
Returns the first result of a query returning instances of a specified class. |
|
org.hibernate.Query |
getNamedQuery(java.lang.String queryName)
Returns a externally defined named query. |
|
|
list(java.lang.Class<T> type,
org.hibernate.Query query)
Returns the results of a query as a list of a specified class. |
|
|
list(java.lang.Class<T> type,
java.lang.String queryName,
java.lang.Object value)
Returns the results of a named query with a single parameter as a list of a specified class. |
|
void |
save(java.lang.Object entity)
Saves an entity. |
|
void |
saveOrUpdate(java.lang.Object entity)
Saves or updates an entity, depending upon resolution of the unsaved-value checks. |
|
|
unique(java.lang.Class<T> type,
org.hibernate.Query query)
Returns the unique result of a query returning instances of a specified class. |
|
|
unique(java.lang.Class<T> type,
java.lang.String queryName,
java.lang.Object value)
Returns the unique result of a named query with a single parameter returning instances of a specified class. |
|
void |
update(java.lang.Object entity)
Updates an entity. |
|
| Methods inherited from interface net.sf.derquinsej.hib3.DAO |
|---|
clear, flush, sync |
| Method Detail |
|---|
<T> T findById(java.lang.Class<T> type,
java.io.Serializable id,
boolean lock)
findById in interface GeneralDAOtype - Entity type.id - ID.lock - If the entity shall be locked.
null if it is not found.<T> java.util.List<T> findAll(java.lang.Class<T> type)
findAll in interface GeneralDAOtype - Entity type.
void save(java.lang.Object entity)
save in interface GeneralDAOentity - Entity to save.void update(java.lang.Object entity)
update in interface GeneralDAOentity - Entity to update.void saveOrUpdate(java.lang.Object entity)
saveOrUpdate in interface GeneralDAOentity - Entity to persist.void delete(java.lang.Object entity)
delete in interface GeneralDAOentity - Instance to delete.
<T> void deleteById(java.lang.Class<T> type,
java.io.Serializable id)
deleteById in interface GeneralDAOtype - Entity type.id - Id of the instance to delete.void evict(java.lang.Object object)
object - The persistent instance to remove.org.hibernate.Query getNamedQuery(java.lang.String queryName)
queryName - Query name.
<T> java.util.List<T> list(java.lang.Class<T> type,
org.hibernate.Query query)
type - Entity type.query - Query to execute.
<T> T first(java.lang.Class<T> type,
org.hibernate.Query query)
type - Entity type.query - Query to execute.
null if there are no results.
<T> T unique(java.lang.Class<T> type,
org.hibernate.Query query)
type - Entity type.query - Query to execute.
null if there are no results.
org.hibernate.NonUniqueResultException - if there are more than one result.
<T> java.util.List<T> list(java.lang.Class<T> type,
java.lang.String queryName,
java.lang.Object value)
type - Entity type.queryName - Query name.value - Non-null parameter value.
<T> T unique(java.lang.Class<T> type,
java.lang.String queryName,
java.lang.Object value)
type - Entity type.queryName - Query name.value - Non-null parameter value.
null if there are no results.
org.hibernate.NonUniqueResultException - if there are more than one result.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||