public class JPAPersistenceAdapter extends Object implements TidePersistenceAdapter
| Modifier and Type | Field and Description |
|---|---|
protected EntityManager |
entityManager |
| Constructor and Description |
|---|
JPAPersistenceAdapter(EntityManager entityManager) |
| Modifier and Type | Method and Description |
|---|---|
Object |
find(Class<?> entityClass,
Serializable id)
Find an entity in the persistence context
|
void |
throwOptimisticLockException(Object entity)
Throw an optimistic locking error
|
protected EntityManager entityManager
public JPAPersistenceAdapter(EntityManager entityManager)
public Object find(Class<?> entityClass, Serializable id)
find in interface TidePersistenceAdapterentityClass - class of the looked up entityid - entity identifierpublic void throwOptimisticLockException(Object entity)
throwOptimisticLockException in interface TidePersistenceAdapterentity - entity instance loaded from the database