|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.student.r2.common.dao.GenericEntityDao<T>
public class GenericEntityDao<T>
Field Summary | |
---|---|
protected EntityManager |
em
|
protected Class<T> |
entityClass
Entity class. |
Constructor Summary | |
---|---|
GenericEntityDao()
|
Method Summary | ||
---|---|---|
T |
find(Serializable primaryKey)
Find object by primary key. |
|
List<T> |
findAll()
Load all entities of this type. |
|
List<T> |
findByIds(List<? extends Serializable> primaryKeys)
Find objects of specified class by primary keys. |
|
EntityManager |
getEm()
|
|
protected
|
getEntityClass()
|
|
T |
merge(T entity)
Merge detached object. |
|
void |
persist(T entity)
Persist unsaved object. |
|
void |
remove(T entity)
Remove entity from the persistent store. |
|
void |
setEm(EntityManager em)
|
|
void |
update(T entity)
Update detached object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Class<T> entityClass
protected EntityManager em
Constructor Detail |
---|
public GenericEntityDao()
Method Detail |
---|
public T find(Serializable primaryKey)
EntityDao
find
in interface EntityDao<T>
primaryKey
- Primary key
public List<T> findByIds(List<? extends Serializable> primaryKeys) throws DoesNotExistException
EntityDao
findByIds
in interface EntityDao<T>
primaryKeys
- - list of Primary keys
DoesNotExistException
public List<T> findAll()
EntityDao
findAll
in interface EntityDao<T>
public void persist(T entity)
EntityDao
persist
in interface EntityDao<T>
entity
- Entity to savepublic void update(T entity)
EntityDao
update
in interface EntityDao<T>
entity
- Entity to updatepublic void remove(T entity)
EntityDao
remove
in interface EntityDao<T>
entity
- Entity to removepublic T merge(T entity)
EntityDao
merge
in interface EntityDao<T>
entity
- Entity to save
protected <K extends T> Class<K> getEntityClass()
public void setEm(EntityManager em)
public EntityManager getEm()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |