fr.paris.lutece.util.jpa
Interface IGenericHome<K,E>

Type Parameters:
K - key class
E - entity class
All Known Implementing Classes:
AbstractLuteceHome

public interface IGenericHome<K,E>

Interface IGenericLuteceHome


Method Summary
 void create(E entity)
          Creates the entity
 List<E> findAll()
          Finds all
 E findByPrimaryKey(K pKey)
          Loads an entity by its key
 void remove(K key)
          Removes the entity if exists
 void update(E entity)
          Merges the entity
 

Method Detail

create

void create(E entity)
Creates the entity

Parameters:
entity - object

update

void update(E entity)
Merges the entity

Parameters:
entity - object

remove

void remove(K key)
Removes the entity if exists

Parameters:
key - The entity key

findByPrimaryKey

@Transactional(readOnly=true)
E findByPrimaryKey(K pKey)
Loads an entity by its key

Parameters:
pKey - primary key
Returns:
the found entity, null otherwise.

findAll

@Transactional(readOnly=true)
List<E> findAll()
Finds all

Returns:
the list


Copyright © 2014 Mairie de Paris. All Rights Reserved.