public class ContextPersistentManager extends Object implements Dao<Object,Serializable>
| Constructor and Description |
|---|
ContextPersistentManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(Collection<Object> collection)
Delete a collection of entities
|
void |
delete(Object entity)
Delete an entity
|
void |
deleteById(Collection<Serializable> ids)
Delete a collection of Ids.
|
void |
deleteById(Serializable id)
Delete an object by primary key
|
boolean |
exists(Serializable id)
Checks for existence of an object of type T using the id arg.
|
List<Object> |
findByNamedQuery(String queryName,
Map<String,Object> queryParams)
Find a list of records by using a named query
|
Object |
get(Serializable id)
Find object by id
|
<E> E |
get(Serializable id,
Class<E> clazz) |
List<Object> |
getAll()
Get all models
|
<E> List<E> |
getAll(Class<E> clazz) |
Class<Object> |
getEntityClass()
Return the entity class
|
List<Serializable> |
getKeys(Page<Object> page)
Gets a List with keys of page
|
<K> Page<K> |
getPage(Page<K> page)
Fill and return a page of data
|
void |
init() |
Object |
initialize(Object entity)
Initalize entity at default depth
|
Object |
initialize(Object entity,
int depth)
Initalize entity
|
Collection<Object> |
save(Collection<Object> collection)
Save a collection entity
|
Object |
save(Object entity)
Save or update an object
|
public void init()
public <K> Page<K> getPage(Page<K> page)
getPage in interface PageableDataSource<Object>public List<Serializable> getKeys(Page<Object> page)
getKeys in interface PageableDataSource<Object>public Object initialize(Object entity, int depth)
initialize in interface Dao<Object,Serializable>entity - to intializedepth - to descend.public Object initialize(Object entity)
initialize in interface Dao<Object,Serializable>entity - to intializepublic Object save(Object entity)
save in interface Dao<Object,Serializable>entity - the object to savepublic void delete(Object entity)
delete in interface Dao<Object,Serializable>entity - to deletepublic void deleteById(Serializable id)
deleteById in interface Dao<Object,Serializable>id - the primary keypublic List<Object> getAll()
getAll in interface Dao<Object,Serializable>public Collection<Object> save(Collection<Object> collection)
save in interface Dao<Object,Serializable>collection - collectin to savepublic void delete(Collection<Object> collection)
delete in interface Dao<Object,Serializable>collection - collectin to deletepublic void deleteById(Collection<Serializable> ids)
deleteById in interface Dao<Object,Serializable>ids - ids to deletepublic Object get(Serializable id)
get in interface Dao<Object,Serializable>id - the identifier (primary key) of the object to getpublic <E> E get(Serializable id, Class<E> clazz)
get in interface Dao<Object,Serializable>public <E> List<E> getAll(Class<E> clazz)
getAll in interface Dao<Object,Serializable>public Class<Object> getEntityClass()
getEntityClass in interface Dao<Object,Serializable>public boolean exists(Serializable id)
exists in interface Dao<Object,Serializable>id - the id of the entitypublic List<Object> findByNamedQuery(String queryName, Map<String,Object> queryParams)
findByNamedQuery in interface Dao<Object,Serializable>queryName - query name of the named queryqueryParams - a map of the query names and the valuesCopyright © 2014 JDAL. All Rights Reserved.