public interface GeneralDAO extends DAO
| Modifier and Type | Method and Description |
|---|---|
void |
delete(Object entity)
Deletes an entity instance.
|
<T> void |
deleteById(Class<T> type,
Serializable id)
Deletes an entity instance.
|
<T> List<T> |
findAll(Class<T> type)
Returns all entities of the persistent type.
|
<T> T |
findById(Class<T> type,
Serializable id,
boolean lock)
Finds an entity by ID.
|
void |
save(Object entity)
Saves an entity.
|
void |
saveOrUpdate(Object entity)
Saves or updates an entity, depending upon resolution of the
unsaved-value checks.
|
void |
update(Object entity)
Updates an entity.
|
<T> T findById(Class<T> type, Serializable id, boolean lock)
type - Entity type.id - ID.lock - If the entity shall be locked.null if it is not found.<T> List<T> findAll(Class<T> type)
type - Entity type.void save(Object entity)
entity - Entity to save.void update(Object entity)
entity - Entity to update.void saveOrUpdate(Object entity)
entity - Entity to persist.void delete(Object entity)
entity - Instance to delete.<T> void deleteById(Class<T> type, Serializable id)
type - Entity type.id - Id of the instance to delete.Copyright © 2014. All rights reserved.