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