Package fr.paris.lutece.util.jpa
Interface IGenericHome<K,E>
-
- Type Parameters:
K- key classE- entity class
- All Known Implementing Classes:
AbstractLuteceHome
public interface IGenericHome<K,E>Interface IGenericLuteceHome
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcreate(E entity)Creates the entityList<E>findAll()Finds allEfindByPrimaryKey(K pKey)Loads an entity by its keyvoidremove(K key)Removes the entity if existsvoidupdate(E entity)Merges the entity
-
-
-
Method Detail
-
create
void create(E entity)
Creates the entity- Parameters:
entity- object
-
update
void update(E entity)
Merges the entity- Parameters:
entity- object
-
remove
void remove(K key)
Removes the entity if exists- Parameters:
key- The entity key
-
findByPrimaryKey
@Transactional(readOnly=true) E findByPrimaryKey(K pKey)
Loads an entity by its key- Parameters:
pKey- primary key- Returns:
- the found entity,
nullotherwise.
-
-