|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface GenericDAO<T,ID extends Serializable>
| Method Summary | |
|---|---|
void |
delete(T entity)
Delete an entity. |
List<T> |
findAll()
Find all entities |
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. |
void |
saveOrUpdate(T entity)
Save or update entity |
| Method Detail |
|---|
T findById(ID id)
id
id - the identity property of the entity
null
T findById(ID id,
boolean lock)
id and optionally
acquire a pessimistic lock on the entity.
id - the unique id for the entitylock - whether or not to obtain a pessimistic lock
null if it does not existList<T> findAll()
void saveOrUpdate(T entity)
entity
entity - the entity to save or updatevoid delete(T entity)
entity - the entity to delete
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||