Class AbstractLuteceHome<K,E,D extends IGenericDAO<K,E>>
- java.lang.Object
-
- fr.paris.lutece.portal.service.jpa.AbstractLuteceHome<K,E,D>
-
- Type Parameters:
K- the key typeE- the element typeD- the generic type
- All Implemented Interfaces:
IGenericHome<K,E>
public abstract class AbstractLuteceHome<K,E,D extends IGenericDAO<K,E>> extends java.lang.Object implements IGenericHome<K,E>
The Class AbstractLuteceHome.
-
-
Constructor Summary
Constructors Constructor Description AbstractLuteceHome()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreate(E entityBean)Creates the entityjava.util.List<E>findAll()Finds allEfindByPrimaryKey(K key)Loads an entity by its keyDgetDao()Gets the dao.voidremove(K key)Removes the entity if existsvoidsetDao(D dao)Sets the dao.voidupdate(E entityBean)Merges the entity
-
-
-
Method Detail
-
setDao
public void setDao(D dao)
Sets the dao.- Parameters:
dao- the new dao
-
getDao
public D getDao()
Gets the dao.- Returns:
- the dao
-
create
@Transactional public void create(E entityBean)
Creates the entity- Specified by:
createin interfaceIGenericHome<K,E>- Parameters:
entityBean- object
-
remove
@Transactional public void remove(K key)
Removes the entity if exists- Specified by:
removein interfaceIGenericHome<K,E>- Parameters:
key- The entity key
-
findByPrimaryKey
public E findByPrimaryKey(K key)
Loads an entity by its key- Specified by:
findByPrimaryKeyin interfaceIGenericHome<K,E>- Parameters:
key- primary key- Returns:
- the found entity,
nullotherwise.
-
update
@Transactional public void update(E entityBean)
Merges the entity- Specified by:
updatein interfaceIGenericHome<K,E>- Parameters:
entityBean- object
-
findAll
public java.util.List<E> findAll()
Finds all- Specified by:
findAllin interfaceIGenericHome<K,E>- Returns:
- the list
-
-