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>
All Implemented Interfaces:
IGenericHome<K,E>

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


Constructor Summary
AbstractLuteceHome()
           
 
Method Summary
 void create(E entityBean)
          Creates the entity
 java.util.List<E> findAll()
          Finds all
 E findByPrimaryKey(K key)
          Loads an entity by its key
 DAO getDao()
          
 void remove(K key)
          Removes the entity if exists
 void setDao(DAO 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)


getDao

public DAO getDao()


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


Copyright © 2010 Mairie de Paris. All Rights Reserved.