public interface EntityDao<K extends Serializable,T extends PersistableEntity<K>>
Modifier and Type | Method and Description |
---|---|
T |
find(K primaryKey)
Find object by primary key.
|
List<T> |
findAll()
Load all entities of this type.
|
List<T> |
findByIds(List<K> primaryKeys)
Find objects of specified class by primary keys.
|
List<T> |
findByIds(String primaryKeyMemberName,
List<K> primaryKeys)
Find objects of specified class by primary keys.
|
EntityManager |
getEm() |
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.
|
T find(K primaryKey)
primaryKey
- Primary keyList<T> findByIds(List<K> primaryKeys) throws Exception
primaryKeys
- - list of Primary keysException
List<T> findByIds(String primaryKeyMemberName, List<K> primaryKeys) throws Exception
primaryKeys
- - list of Primary keysException
T merge(T entity)
entity
- Entity to savevoid remove(T entity)
entity
- Entity to removeEntityManager getEm() throws UnsupportedOperationException
UnsupportedOperationException
- if there is no EM associated with thisvoid setEm(EntityManager em) throws UnsupportedOperationException
em
- An entity manager, if applicableUnsupportedOperationException
- if there is no EM associated with thisCopyright © 2004-2013 The Kuali Foundation. All Rights Reserved.