Class AbstractLuteceHome<K,​E,​D extends IGenericDAO<K,​E>>

  • 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 java.lang.Object
    implements IGenericHome<K,​E>
    The Class AbstractLuteceHome.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void create​(E entityBean)
      Creates the entity
      java.util.List<E> findAll()
      Finds all
      E findByPrimaryKey​(K key)
      Loads an entity by its key
      D getDao()
      Gets the dao.
      void remove​(K key)
      Removes the entity if exists
      void setDao​(D dao)
      Sets the dao.
      void update​(E entityBean)
      Merges the entity
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractLuteceHome

        public AbstractLuteceHome()
    • 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:
        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 java.util.List<E> findAll()
        Finds all
        Specified by:
        findAll in interface IGenericHome<K,​E>
        Returns:
        the list