Package org.nuxeo.ecm.core.persistence
Class PersistenceProvider
java.lang.Object
org.nuxeo.ecm.core.persistence.PersistenceProvider
- Author:
- Stephane Lacoin [aka matic]
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static interface
-
Field Summary
Modifier and TypeFieldDescriptionprotected javax.persistence.EntityManagerFactory
protected final EntityManagerFactoryProvider
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionjavax.persistence.EntityManager
javax.persistence.EntityManager
void
protected javax.persistence.EntityManager
protected void
doBegin
(javax.persistence.EntityManager em) protected void
doCommit
(javax.persistence.EntityManager em) protected void
doRollback
(javax.persistence.EntityManager em) protected javax.persistence.EntityTransaction
getTransaction
(javax.persistence.EntityManager em) void
protected void
releaseEntityManager
(javax.persistence.EntityManager em) void
releaseEntityManagerWithRollback
(javax.persistence.EntityManager em) <T> T
run
(Boolean needActiveSession, PersistenceProvider.RunCallback<T> callback) void
run
(Boolean needActiveSession, PersistenceProvider.RunVoid callback)
-
Field Details
-
emf
protected volatile javax.persistence.EntityManagerFactory emf -
emfProvider
-
-
Constructor Details
-
PersistenceProvider
-
-
Method Details
-
openPersistenceUnit
public void openPersistenceUnit() -
closePersistenceUnit
public void closePersistenceUnit() -
doAcquireEntityManager
protected javax.persistence.EntityManager doAcquireEntityManager() -
getTransaction
protected javax.persistence.EntityTransaction getTransaction(javax.persistence.EntityManager em) -
acquireEntityManager
public javax.persistence.EntityManager acquireEntityManager() -
acquireEntityManagerWithActiveTransaction
public javax.persistence.EntityManager acquireEntityManagerWithActiveTransaction() -
doBegin
protected void doBegin(javax.persistence.EntityManager em) -
doCommit
protected void doCommit(javax.persistence.EntityManager em) -
doRollback
protected void doRollback(javax.persistence.EntityManager em) -
releaseEntityManager
protected void releaseEntityManager(javax.persistence.EntityManager em) -
releaseEntityManagerWithRollback
public void releaseEntityManagerWithRollback(javax.persistence.EntityManager em) -
run
-
run
-