| java.lang.Object org.springframework.orm.jpa.ExtendedEntityManagerCreator
ExtendedEntityManagerCreator | abstract public class ExtendedEntityManagerCreator (Code) | | Factory for dynamic EntityManager proxies that follow the JPA spec's
semantics for "extended" EntityManagers.
Supports explicit joining of a transaction through the
joinTransaction() method ("application-managed extended
EntityManager") as well as automatic joining on each operation
("container-managed extended EntityManager").
author: Rod Johnson author: Juergen Hoeller since: 2.0 |
Method Summary | |
public static EntityManager | createApplicationManagedEntityManager(EntityManager rawEntityManager, EntityManagerPlusOperations plusOperations) Create an EntityManager that can join transactions with the
joinTransaction() method, but is not automatically
managed by the container. | public static EntityManager | createApplicationManagedEntityManager(EntityManager rawEntityManager, EntityManagerPlusOperations plusOperations, PersistenceExceptionTranslator exceptionTranslator) Create an EntityManager that can join transactions with the
joinTransaction() method, but is not automatically
managed by the container. | public static EntityManager | createApplicationManagedEntityManager(EntityManager rawEntityManager, EntityManagerFactoryInfo emfInfo) Create an EntityManager that can join transactions with the
joinTransaction() method, but is not automatically
managed by the container. | public static EntityManager | createContainerManagedEntityManager(EntityManager rawEntityManager, EntityManagerPlusOperations plusOperations) Create an EntityManager that automatically joins transactions on each
operation in a transaction. | public static EntityManager | createContainerManagedEntityManager(EntityManager rawEntityManager, EntityManagerPlusOperations plusOperations, PersistenceExceptionTranslator exceptionTranslator) Create an EntityManager that automatically joins transactions on each
operation in a transaction. | public static EntityManager | createContainerManagedEntityManager(EntityManager rawEntityManager, EntityManagerFactoryInfo emfInfo) Create an EntityManager that automatically joins transactions on each
operation in a transaction. | public static EntityManager | createContainerManagedEntityManager(EntityManagerFactory emf) Create an EntityManager that automatically joins transactions on each
operation in a transaction.
Parameters: emf - the EntityManagerFactory to create the EntityManager with.If this implements the EntityManagerFactoryInfo interface, appropriate handlingof the native EntityManagerFactory and available EntityManagerPlusOperationswill automatically apply. | public static EntityManager | createContainerManagedEntityManager(EntityManagerFactory emf, Map properties) Create an EntityManager that automatically joins transactions on each
operation in a transaction. |
createApplicationManagedEntityManager | public static EntityManager createApplicationManagedEntityManager(EntityManager rawEntityManager, EntityManagerPlusOperations plusOperations)(Code) | | Create an EntityManager that can join transactions with the
joinTransaction() method, but is not automatically
managed by the container.
Parameters: rawEntityManager - raw EntityManager Parameters: plusOperations - an implementation of the EntityManagerPlusOperationsinterface, if those operations should be exposed (may be null ) an application-managed EntityManager that can join transactionsbut does not participate in them automatically |
createApplicationManagedEntityManager | public static EntityManager createApplicationManagedEntityManager(EntityManager rawEntityManager, EntityManagerPlusOperations plusOperations, PersistenceExceptionTranslator exceptionTranslator)(Code) | | Create an EntityManager that can join transactions with the
joinTransaction() method, but is not automatically
managed by the container.
Parameters: rawEntityManager - raw EntityManager Parameters: plusOperations - an implementation of the EntityManagerPlusOperationsinterface, if those operations should be exposed (may be null ) Parameters: exceptionTranslator - the exception translator to use for translatingJPA commit/rollback exceptions during transaction synchronization(may be null ) an application-managed EntityManager that can join transactionsbut does not participate in them automatically |
createApplicationManagedEntityManager | public static EntityManager createApplicationManagedEntityManager(EntityManager rawEntityManager, EntityManagerFactoryInfo emfInfo)(Code) | | Create an EntityManager that can join transactions with the
joinTransaction() method, but is not automatically
managed by the container.
Parameters: rawEntityManager - raw EntityManager Parameters: emfInfo - the EntityManagerFactoryInfo to obtain theEntityManagerPlusOperations and PersistenceUnitInfo from an application-managed EntityManager that can join transactionsbut does not participate in them automatically |
createContainerManagedEntityManager | public static EntityManager createContainerManagedEntityManager(EntityManager rawEntityManager, EntityManagerPlusOperations plusOperations)(Code) | | Create an EntityManager that automatically joins transactions on each
operation in a transaction.
Parameters: rawEntityManager - raw EntityManager Parameters: plusOperations - an implementation of the EntityManagerPlusOperationsinterface, if those operations should be exposed (may be null ) a container-managed EntityManager that will automatically participatein any managed transaction |
createContainerManagedEntityManager | public static EntityManager createContainerManagedEntityManager(EntityManager rawEntityManager, EntityManagerPlusOperations plusOperations, PersistenceExceptionTranslator exceptionTranslator)(Code) | | Create an EntityManager that automatically joins transactions on each
operation in a transaction.
Parameters: rawEntityManager - raw EntityManager Parameters: plusOperations - an implementation of the EntityManagerPlusOperationsinterface, if those operations should be exposed (may be null ) Parameters: exceptionTranslator - the exception translator to use for translatingJPA commit/rollback exceptions during transaction synchronization(may be null ) a container-managed EntityManager that will automatically participatein any managed transaction |
createContainerManagedEntityManager | public static EntityManager createContainerManagedEntityManager(EntityManager rawEntityManager, EntityManagerFactoryInfo emfInfo)(Code) | | Create an EntityManager that automatically joins transactions on each
operation in a transaction.
Parameters: rawEntityManager - raw EntityManager Parameters: emfInfo - the EntityManagerFactoryInfo to obtain theEntityManagerPlusOperations and PersistenceUnitInfo from a container-managed EntityManager that will automatically participatein any managed transaction |
createContainerManagedEntityManager | public static EntityManager createContainerManagedEntityManager(EntityManagerFactory emf)(Code) | | Create an EntityManager that automatically joins transactions on each
operation in a transaction.
Parameters: emf - the EntityManagerFactory to create the EntityManager with.If this implements the EntityManagerFactoryInfo interface, appropriate handlingof the native EntityManagerFactory and available EntityManagerPlusOperationswill automatically apply. a container-managed EntityManager that will automatically participatein any managed transaction See Also: javax.persistence.EntityManagerFactory.createEntityManager |
createContainerManagedEntityManager | public static EntityManager createContainerManagedEntityManager(EntityManagerFactory emf, Map properties)(Code) | | Create an EntityManager that automatically joins transactions on each
operation in a transaction.
Parameters: emf - the EntityManagerFactory to create the EntityManager with.If this implements the EntityManagerFactoryInfo interface, appropriate handlingof the native EntityManagerFactory and available EntityManagerPlusOperationswill automatically apply. Parameters: properties - the properties to be passed into the createEntityManager call (may be null ) a container-managed EntityManager that will automatically participatein any managed transaction See Also: javax.persistence.EntityManagerFactory.createEntityManager(java.util.Map) |
|
|