JpaSupportService (interface)

Provides access to the current interaction’s EntityManager (s)

API

JpaSupportService.java
interface JpaSupportService {
  Result<EntityManager> getEntityManager(Class<?> entityType)     (1)
  EntityManager getEntityManagerElseFail(final Class<?> entityType)     (2)
}
1 getEntityManager(Class)

Optionally returns the current interaction’s EntityManager , that is bound to given entityClass , based on whether an open interaction is available and a persistence layer is configured in support of JPA.

2 getEntityManagerElseFail(Class)

Returns the current interaction’s EntityManager that is managing the given domain type entityType .

Members

getEntityManager(Class)

Optionally returns the current interaction’s EntityManager , that is bound to given entityClass , based on whether an open interaction is available and a persistence layer is configured in support of JPA.

getEntityManagerElseFail(Class)

Returns the current interaction’s EntityManager that is managing the given domain type entityType .