T - the generic type of the entity objectPK - the generic type of the primary keypublic interface EntityManagerDao<T extends BaseEntity<PK>,PK extends Serializable> extends GenericDao<T,PK>
EntityManagerDao.| Modifier and Type | Method and Description |
|---|---|
void |
create(T entity)
Persists the given entity.
|
TypedQuery<T> |
createNamedQuery(String name,
Class<T> resultClass)
Factory method for create a new
TypedQuery from the given name and the given type. |
TypedQuery<T> |
createNamedTypedQuery(String name)
Factory method for create a new
TypedQuery from the given name and the type of the
generic entity. |
EntityManager |
getEntityManager()
Gets the entity manager.
|
Query |
getQuery(String hqlQuery)
Gets a
Query from the given hql query. |
void |
setEntityManager(EntityManager entityManager)
Sets the entity manager.
|
void create(T entity)
entity - the entityTypedQuery<T> createNamedQuery(String name, Class<T> resultClass)
TypedQuery from the given name and the given type.name - the nameresultClass - the result classTypedQueryTypedQuery<T> createNamedTypedQuery(String name)
TypedQuery from the given name and the type of the
generic entity.name - the nameTypedQueryEntityManager getEntityManager()
Query getQuery(String hqlQuery)
Query from the given hql query.hqlQuery - the hql queryQueryvoid setEntityManager(EntityManager entityManager)
entityManager - the new entity managerCopyright © 2015–2017 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.