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

Type Parameters:
K - Type of the entity's key
E - Type of the entity
All Known Implementing Classes:
JPAGenericDAO, JPALuteceCoreDAO, JPALuteceDAO

public interface IGenericDAO<K,E>

Class GenericDAO


Method Summary
 void create(E entity)
          Create an entity
 java.util.List<E> findAll()
          Find all entities
 E findById(K key)
          Find an entity by its Id
 void remove(K key)
          Remove an entity
 void update(E entity)
          Update an entity
 

Method Detail

create

void create(E entity)
Create an entity

Parameters:
entity - The entity to create

update

void update(E entity)
Update an entity

Parameters:
entity - An entity that contains new values

remove

void remove(K key)
Remove an entity

Parameters:
key - The key of the entity to remove

findById

E findById(K key)
Find an entity by its Id

Parameters:
key - The entity key
Returns:
The entity object

findAll

java.util.List<E> findAll()
Find all entities

Returns:
A list of entities


Copyright © 2010 Mairie de Paris. All Rights Reserved.