fr.paris.lutece.portal.service.jpa
Class AbstractLuteceHome<K,E,DAO extends IGenericDAO<K,E>>

java.lang.Object
  extended by fr.paris.lutece.portal.service.jpa.AbstractLuteceHome<K,E,DAO>
Type Parameters:
K - the key type
E - the element type
DAO - the generic type
All Implemented Interfaces:
IGenericHome<K,E>

public abstract class AbstractLuteceHome<K,E,DAO extends IGenericDAO<K,E>>
extends Object
implements IGenericHome<K,E>

The Class AbstractLuteceHome.


Constructor Summary
AbstractLuteceHome()
           
 
Method Summary
 void create(E entityBean)
          Creates the entity
 List<E> findAll()
          Finds all
 E findByPrimaryKey(K key)
          Loads an entity by its key
 DAO getDao()
          Gets the dao.
 void remove(K key)
          Removes the entity if exists
 void setDao(DAO dao)
          Sets the dao.
 void update(E entityBean)
          Merges the entity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractLuteceHome

public AbstractLuteceHome()
Method Detail

setDao

public void setDao(DAO dao)
Sets the dao.

Parameters:
dao - the new dao

getDao

public DAO 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


Copyright © 2014 Mairie de Paris. All Rights Reserved.