K
- Type of the entity's keyE
- Type of the entitypublic interface IGenericDAO<K,E>
Modifier and Type | Method and Description |
---|---|
void |
create(E entity)
Create an entity
|
void |
detach(E entity)
Remove the given entity from the persistence context, causing a managed entity to become detached.
|
List<E> |
findAll()
Find all entities
|
E |
findById(K key)
Find an entity by its Id
|
void |
flush()
Synchronize the persistence context to the underlying database.
|
void |
remove(K key)
Remove an entity
|
void |
update(E entity)
Update an entity
|
void create(E entity)
entity
- The entity to createvoid update(E entity)
entity
- An entity that contains new valuesvoid remove(K key)
key
- The key of the entity to removeE findById(K key)
key
- The entity keyvoid flush()
void detach(E entity)
entity
- the entityCopyright © 2020 City of Paris. All rights reserved.