public class EntityManagerImpl extends AbstractEntityManagerImpl implements SessionOwner
EntityManager.AbstractEntityManagerImpl.TupleBuilderTransformerHibernateEntityManagerImplementor.QueryOptions| Modifier and Type | Field and Description |
|---|---|
protected boolean |
discardOnClose |
static EntityManagerMessageLogger |
LOG |
protected boolean |
open |
protected Session |
session |
tx| Constructor and Description |
|---|
EntityManagerImpl(EntityManagerFactoryImpl entityManagerFactory,
javax.persistence.PersistenceContextType pcType,
javax.persistence.SynchronizationType synchronizationType,
javax.persistence.spi.PersistenceUnitTransactionType transactionType,
boolean discardOnClose,
java.lang.Class sessionInterceptorClass,
java.util.Map properties) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkOpen() |
void |
checkOpen(boolean markForRollbackIfClosed)
Used to ensure the EntityManager is open, throwing IllegalStateException if it is closed.
|
void |
close() |
<T> javax.persistence.EntityGraph<T> |
createEntityGraph(java.lang.Class<T> rootType) |
javax.persistence.EntityGraph<?> |
createEntityGraph(java.lang.String graphName) |
AfterCompletionAction |
getAfterCompletionAction() |
javax.persistence.EntityGraph<?> |
getEntityGraph(java.lang.String graphName) |
<T> java.util.List<javax.persistence.EntityGraph<? super T>> |
getEntityGraphs(java.lang.Class<T> entityClass) |
ExceptionMapper |
getExceptionMapper() |
ManagedFlushChecker |
getManagedFlushChecker() |
protected Session |
getRawSession()
Return a Session (even if the entity manager is closed).
|
Session |
getSession()
return a Session
|
protected Session |
internalGetSession()
Return a Session without any validation checks.
|
boolean |
isOpen() |
boolean |
shouldAutoCloseSession()
Should session automatically be closed after transaction completion?
|
applySavedSettings, clear, contains, convert, convert, convert, convert, createNamedJpqlQuery, createNamedQuery, createNamedQuery, createNamedSqlQuery, createNamedStoredProcedureQuery, createNativeQuery, createNativeQuery, createNativeQuery, createQuery, createQuery, createQuery, createQuery, createQuery, createQuery, createStoredProcedureQuery, createStoredProcedureQuery, createStoredProcedureQuery, criteriaCompiler, detach, determineAppropriateLocalCacheMode, find, find, find, find, flush, getCriteriaBuilder, getDelegate, getEntityManagerFactory, getFactory, getFlushMode, getLockMode, getLockRequest, getMetamodel, getProperties, getReference, getSynchronizationType, getTransaction, getTransactionType, handlePersistenceException, internalGetEntityManagerFactory, isJoinedToTransaction, isTransactionInProgress, joinTransaction, lock, lock, markForRollbackOnly, merge, persist, postInit, refresh, refresh, refresh, refresh, remove, resultClassChecking, resultClassChecking, setFlushMode, setProperty, throwPersistenceException, throwPersistenceException, unwrap, wrapAsJpaQuery, wrapLockException, wrapStaleStateExceptionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconvert, convert, createQuery, getLockRequest, handlePersistenceException, isTransactionInProgress, markForRollbackOnly, throwPersistenceException, throwPersistenceException, wrapStaleStateExceptiongetFactoryclear, contains, createNamedQuery, createNamedQuery, createNamedStoredProcedureQuery, createNativeQuery, createNativeQuery, createNativeQuery, createQuery, createQuery, createQuery, createQuery, createQuery, createStoredProcedureQuery, createStoredProcedureQuery, createStoredProcedureQuery, detach, find, find, find, find, flush, getCriteriaBuilder, getDelegate, getEntityManagerFactory, getFlushMode, getLockMode, getMetamodel, getProperties, getReference, getTransaction, isJoinedToTransaction, joinTransaction, lock, lock, merge, persist, refresh, refresh, refresh, refresh, remove, setFlushMode, setProperty, unwrappublic static final EntityManagerMessageLogger LOG
protected Session session
protected boolean open
protected boolean discardOnClose
public EntityManagerImpl(EntityManagerFactoryImpl entityManagerFactory, javax.persistence.PersistenceContextType pcType, javax.persistence.SynchronizationType synchronizationType, javax.persistence.spi.PersistenceUnitTransactionType transactionType, boolean discardOnClose, java.lang.Class sessionInterceptorClass, java.util.Map properties)
protected void checkOpen()
checkOpen in class AbstractEntityManagerImplpublic void checkOpen(boolean markForRollbackIfClosed)
HibernateEntityManagerImplementormarkForRollbackIfClosed, may also rollback any enlisted-in transaction. This
distinction is made across various sections of the spec. Most failed checks should rollback. Section
3.10.7 (per 2.1 spec) lists cases related to calls on related query objects that should not rollback.checkOpen in interface HibernateEntityManagerImplementormarkForRollbackIfClosed - If the EM is closed, should the transaction (if one) be marked for rollback?public Session getSession()
AbstractEntityManagerImplgetSession in interface HibernateEntityManagergetSession in class AbstractEntityManagerImplprotected Session getRawSession()
AbstractEntityManagerImplgetRawSession in class AbstractEntityManagerImplprotected Session internalGetSession()
AbstractEntityManagerImplinternalGetSession in class AbstractEntityManagerImplpublic void close()
close in interface javax.persistence.EntityManagerpublic boolean isOpen()
isOpen in interface javax.persistence.EntityManagerpublic <T> javax.persistence.EntityGraph<T> createEntityGraph(java.lang.Class<T> rootType)
createEntityGraph in interface javax.persistence.EntityManagerpublic javax.persistence.EntityGraph<?> createEntityGraph(java.lang.String graphName)
createEntityGraph in interface javax.persistence.EntityManagerpublic javax.persistence.EntityGraph<?> getEntityGraph(java.lang.String graphName)
getEntityGraph in interface javax.persistence.EntityManagerpublic <T> java.util.List<javax.persistence.EntityGraph<? super T>> getEntityGraphs(java.lang.Class<T> entityClass)
getEntityGraphs in interface javax.persistence.EntityManagerpublic boolean shouldAutoCloseSession()
SessionOwnershouldAutoCloseSession in interface SessionOwnerpublic ExceptionMapper getExceptionMapper()
getExceptionMapper in interface SessionOwnerpublic AfterCompletionAction getAfterCompletionAction()
getAfterCompletionAction in interface SessionOwnerpublic ManagedFlushChecker getManagedFlushChecker()
getManagedFlushChecker in interface SessionOwnerCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.