|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Dao<T,PK extends Serializable>
Generic DAO with pageable datasource interface.
| Method Summary | ||
|---|---|---|
void |
delete(T entity)
Delete an entity |
|
void |
deleteById(PK id)
Delete an object by primary key |
|
boolean |
exists(PK id)
Checks for existence of an object of type T using the id arg. |
|
List<T> |
findByNamedQuery(String queryName,
Map<String,Object> queryParams)
Find a list of records by using a named query |
|
T |
get(PK id)
Find object by id |
|
|
get(PK id,
Class<E> clazz)
|
|
List<T> |
getAll()
Get all models |
|
|
getAll(Class<E> clazz)
|
|
T |
initialize(T entity)
Initalize entity at default depth |
|
T |
initialize(T entity,
int depth)
Initalize entity |
|
T |
save(T object)
Save or update an object |
|
| Methods inherited from interface info.joseluismartin.dao.PageableDataSource |
|---|
getKeys, getPage |
| Method Detail |
|---|
List<T> getAll()
T get(PK id)
id - the identifier (primary key) of the object to get
boolean exists(PK id)
id - the id of the entity
T save(T object)
object - the object to save
void deleteById(PK id)
id - the primary keyvoid delete(T entity)
entity - to delete
List<T> findByNamedQuery(String queryName,
Map<String,Object> queryParams)
queryName - query name of the named queryqueryParams - a map of the query names and the values
T initialize(T entity)
entity - to intialize
T initialize(T entity,
int depth)
entity - to intializedepth - to descend.
<E> E get(PK id,
Class<E> clazz)
<E> List<E> getAll(Class<E> clazz)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||