Package fr.paris.lutece.util.jpa
Interface IGenericDAO<K,E>
- Type Parameters:
K- Type of the entity's keyE- Type of the entity
- All Known Implementing Classes:
JPAGenericDAO,JPALuteceCoreDAO,JPALuteceDAO
public interface IGenericDAO<K,E>
Class GenericDAO
-
Method Summary
Modifier and TypeMethodDescriptionvoidCreate an entityvoidRemove the given entity from the persistence context, causing a managed entity to become detached.findAll()Find all entitiesFind an entity by its Idvoidflush()Synchronize the persistence context to the underlying database.voidRemove an entityvoidUpdate an entity
-
Method Details
-
create
Create an entity- Parameters:
entity- The entity to create
-
update
Update an entity- Parameters:
entity- An entity that contains new values
-
remove
Remove an entity- Parameters:
key- The key of the entity to remove
-
findById
Find an entity by its Id- Parameters:
key- The entity key- Returns:
- The entity object
-
findAll
Find all entities- Returns:
- A list of entities
-
flush
void flush()Synchronize the persistence context to the underlying database. -
detach
Remove the given entity from the persistence context, causing a managed entity to become detached.- Parameters:
entity- the entity
-