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 type
E - the element type
D - the generic type
All Implemented Interfaces:
IGenericHome<K,E>

public abstract class AbstractLuteceHome<K,E,D extends IGenericDAO<K,E>> extends Object implements IGenericHome<K,E>
The Class AbstractLuteceHome.
  • Constructor Details

    • AbstractLuteceHome

      public AbstractLuteceHome()
  • Method Details

    • 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:
      create in interface IGenericHome<K,E>
      Parameters:
      entityBean - object
    • remove

      @Transactional public void remove(K key)
      Removes the entity if exists
      Specified by:
      remove in interface IGenericHome<K,E>
      Parameters:
      key - The entity key
    • findByPrimaryKey

      public E findByPrimaryKey(K key)
      Loads an entity by its key
      Specified by:
      findByPrimaryKey in interface IGenericHome<K,E>
      Parameters:
      key - primary key
      Returns:
      the found entity, null otherwise.
    • update

      @Transactional public void update(E entityBean)
      Merges the entity
      Specified by:
      update in interface IGenericHome<K,E>
      Parameters:
      entityBean - object
    • findAll

      public List<E> findAll()
      Finds all
      Specified by:
      findAll in interface IGenericHome<K,E>
      Returns:
      the list