org.granite.tide.data
Interface TidePersistenceAdapter

All Known Implementing Classes:
HibernatePersistenceAdapter, JPAPersistenceAdapter

public interface TidePersistenceAdapter

Responsible for persisting changes in the persistence context

Author:
William DRAI

Method Summary
 Object find(Class<?> entityClass, Serializable id)
          Find an entity in the persistence context Note : MUST NOT return a proxy object but an actual class instance
 void throwOptimisticLockException(Object entity)
          Throw an optimistic locking error
 

Method Detail

find

Object find(Class<?> entityClass,
            Serializable id)
Find an entity in the persistence context Note : MUST NOT return a proxy object but an actual class instance

Parameters:
entityClass - class of the looked up entity
id - entity identifier
Returns:
the entity with the persistence context.

throwOptimisticLockException

void throwOptimisticLockException(Object entity)
Throw an optimistic locking error

Parameters:
entity - entity instance loaded from the database