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,
                 PersistenceContextType pcType,
                 SynchronizationType synchronizationType,
                 PersistenceUnitTransactionType transactionType,
                 boolean discardOnClose,
                 Class sessionInterceptorClass,
                 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> EntityGraph<T> | 
createEntityGraph(Class<T> rootType)  | 
EntityGraph<?> | 
createEntityGraph(String graphName)  | 
EntityGraph<?> | 
getEntityGraph(String graphName)  | 
<T> List<EntityGraph<? super T>> | 
getEntityGraphs(Class<T> entityClass)  | 
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, 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, PersistenceContextType pcType, SynchronizationType synchronizationType, PersistenceUnitTransactionType transactionType, boolean discardOnClose, Class sessionInterceptorClass, 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 EntityManagerpublic boolean isOpen()
isOpen in interface EntityManagerpublic <T> EntityGraph<T> createEntityGraph(Class<T> rootType)
createEntityGraph in interface EntityManagerpublic EntityGraph<?> createEntityGraph(String graphName)
createEntityGraph in interface EntityManagerpublic EntityGraph<?> getEntityGraph(String graphName)
getEntityGraph in interface EntityManagerpublic <T> List<EntityGraph<? super T>> getEntityGraphs(Class<T> entityClass)
getEntityGraphs in interface EntityManagerpublic boolean shouldAutoCloseSession()
SessionOwnershouldAutoCloseSession in interface SessionOwnerCopyright © 2001-2015 Red Hat, Inc. All Rights Reserved.