|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.paris.lutece.util.jpa.JPAGenericDAO<K,E>
K
- Type of the entity's keyE
- Type of the entitypublic abstract class JPAGenericDAO<K,E>
Class JPAGenericDAO
Constructor Summary | |
---|---|
JPAGenericDAO()
Constructor |
Method Summary | |
---|---|
void |
create(E entity)
Create an entity |
java.util.List<E> |
findAll()
Find all entities |
E |
findById(K key)
Find an entity by its Id |
javax.persistence.EntityManager |
getEM()
Return the Entity Manager |
java.lang.String |
getEntityClassName()
Returns the entity class name |
abstract javax.persistence.EntityManagerFactory |
getEntityManagerFactory()
Inherit classes should provide their Entity Manager Factory |
void |
remove(K key)
Remove an entity |
void |
update(E entity)
Update an entity |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JPAGenericDAO()
Method Detail |
---|
public abstract javax.persistence.EntityManagerFactory getEntityManagerFactory()
public java.lang.String getEntityClassName()
public javax.persistence.EntityManager getEM()
public void create(E entity)
create
in interface IGenericDAO<K,E>
entity
- The entity to createpublic void remove(K key)
remove
in interface IGenericDAO<K,E>
key
- The key of the entity to removepublic void update(E entity)
update
in interface IGenericDAO<K,E>
entity
- An entity that contains new valuespublic E findById(K key)
findById
in interface IGenericDAO<K,E>
key
- The entity key
public java.util.List<E> findAll()
findAll
in interface IGenericDAO<K,E>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |