|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.soton.itinnovation.grid.service.sla.dao.GenericHibernateDAO<T,ID>
public abstract class GenericHibernateDAO<T,ID extends Serializable>
| Constructor Summary | |
|---|---|
GenericHibernateDAO()
|
|
| Method Summary | |
|---|---|
void |
delete(T entity)
Delete an entity. |
List<T> |
findAll()
Find all entities |
protected List<T> |
findByCriteria(org.hibernate.criterion.Criterion... criterion)
|
T |
findById(ID id)
Find the entity identified by id |
T |
findById(ID id,
boolean lock)
Find the entity identified by id and optionally
acquire a pessimistic lock on the entity. |
Class<T> |
getPersistentClass()
|
void |
saveOrUpdate(T entity)
Save or update entity |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GenericHibernateDAO()
| Method Detail |
|---|
public Class<T> getPersistentClass()
public T findById(ID id)
GenericDAOid
findById in interface GenericDAO<T,ID extends Serializable>id - the identity property of the entity
null
public T findById(ID id,
boolean lock)
GenericDAOid and optionally
acquire a pessimistic lock on the entity.
findById in interface GenericDAO<T,ID extends Serializable>id - the unique id for the entitylock - whether or not to obtain a pessimistic lock
null if it does not existpublic List<T> findAll()
GenericDAO
findAll in interface GenericDAO<T,ID extends Serializable>public void saveOrUpdate(T entity)
GenericDAOentity
saveOrUpdate in interface GenericDAO<T,ID extends Serializable>entity - the entity to save or updatepublic void delete(T entity)
GenericDAO
delete in interface GenericDAO<T,ID extends Serializable>entity - the entity to deleteprotected List<T> findByCriteria(org.hibernate.criterion.Criterion... criterion)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||