Package org.hibernate.jpa.spi
Interface HibernateEntityManagerImplementor
-
- All Superinterfaces:
EntityManager
,HibernateEntityManager
,HibernateEntityManager
,HibernateEntityManagerFactoryAware
,QueryProducer
- All Known Subinterfaces:
EventSource
,SessionImplementor
- All Known Implementing Classes:
SessionDelegatorBaseImpl
@Deprecated public interface HibernateEntityManagerImplementor extends HibernateEntityManager, HibernateEntityManagerFactoryAware
Deprecated.(since 5.2) move these methods to SessionImplementorAdditional internal contracts for the HibernateEntityManager
implementation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
HibernateEntityManagerImplementor.QueryOptions
Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default LockOptions
buildLockOptions(LockModeType lockModeType, java.util.Map<java.lang.String,java.lang.Object> properties)
Deprecated.Given a JPALockModeType
and properties, build a HibernateLockOptions
void
checkOpen(boolean markForRollbackIfClosed)
Deprecated.Used to ensure the EntityManager is open, throwing IllegalStateException if it is closed.<T> Query<T>
createQuery(java.lang.String jpaqlString, java.lang.Class<T> resultClass, Selection selection, HibernateEntityManagerImplementor.QueryOptions queryOptions)
Deprecated.(since 5.2) this method form is used to construct a "compiled" representation of a JPA Criteria query.LockOptions
getLockRequest(LockModeType lockModeType, java.util.Map<java.lang.String,java.lang.Object> properties)
Deprecated.(since 5.2) usebuildLockOptions(LockModeType, Map)
insteadSessionImplementor
getSession()
Deprecated.Retrieve a reference to the HibernateSession
used by thisEntityManager
.boolean
isTransactionInProgress()
Deprecated.Provides access to whether a transaction is currently in progress.void
markForRollbackOnly()
Deprecated.Used to mark a transaction for rollback only (when that is the JPA spec defined behavior).-
Methods inherited from interface javax.persistence.EntityManager
clear, close, contains, createEntityGraph, createEntityGraph, createNamedQuery, createNamedQuery, createNamedStoredProcedureQuery, createNativeQuery, createNativeQuery, createNativeQuery, createQuery, createQuery, createQuery, createQuery, createQuery, createStoredProcedureQuery, createStoredProcedureQuery, createStoredProcedureQuery, detach, find, find, find, find, flush, getCriteriaBuilder, getDelegate, getEntityGraph, getEntityGraphs, getEntityManagerFactory, getFlushMode, getLockMode, getMetamodel, getProperties, getReference, getTransaction, isJoinedToTransaction, isOpen, joinTransaction, lock, lock, merge, persist, refresh, refresh, refresh, refresh, remove, setFlushMode, setProperty, unwrap
-
Methods inherited from interface org.hibernate.jpa.spi.HibernateEntityManagerFactoryAware
getFactory
-
Methods inherited from interface org.hibernate.query.QueryProducer
createNamedQuery, createNamedQuery, createNativeQuery, createNativeQuery, createNativeQuery, createQuery, createQuery, createSQLQuery, getNamedNativeQuery, getNamedQuery, getNamedSQLQuery
-
-
-
-
Method Detail
-
getSession
SessionImplementor getSession()
Deprecated.Description copied from interface:HibernateEntityManager
Retrieve a reference to the HibernateSession
used by thisEntityManager
.- Specified by:
getSession
in interfaceHibernateEntityManager
- Returns:
- The session
-
checkOpen
void checkOpen(boolean markForRollbackIfClosed) throws java.lang.IllegalStateException
Deprecated.Used to ensure the EntityManager is open, throwing IllegalStateException if it is closed. Depending on the value ofmarkForRollbackIfClosed
, 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.- Parameters:
markForRollbackIfClosed
- If the EM is closed, should the transaction (if one) be marked for rollback?- Throws:
java.lang.IllegalStateException
- Thrown if the EM is closed
-
isTransactionInProgress
boolean isTransactionInProgress()
Deprecated.Provides access to whether a transaction is currently in progress.- Returns:
- True if a transaction is considered currently in progress; false otherwise.
-
markForRollbackOnly
void markForRollbackOnly()
Deprecated.Used to mark a transaction for rollback only (when that is the JPA spec defined behavior).
-
getLockRequest
@Deprecated LockOptions getLockRequest(LockModeType lockModeType, java.util.Map<java.lang.String,java.lang.Object> properties)
Deprecated.(since 5.2) usebuildLockOptions(LockModeType, Map)
insteadConvert from JPA 2LockModeType
& properties intoLockOptions
- Parameters:
lockModeType
- is the requested lock typeproperties
- are the lock properties- Returns:
- the LockOptions
-
buildLockOptions
default LockOptions buildLockOptions(LockModeType lockModeType, java.util.Map<java.lang.String,java.lang.Object> properties)
Deprecated.Given a JPALockModeType
and properties, build a HibernateLockOptions
- Parameters:
lockModeType
- the requested LockModeTypeproperties
- the lock properties- Returns:
- the LockOptions
-
createQuery
@Deprecated <T> Query<T> createQuery(java.lang.String jpaqlString, java.lang.Class<T> resultClass, Selection selection, HibernateEntityManagerImplementor.QueryOptions queryOptions)
Deprecated.(since 5.2) this method form is used to construct a "compiled" representation of a JPA Criteria query. However it assumes the old yucky implementation of "compilation" that converted the Criteria into a HQL/JPQL string. In 6.0 that is re-written from scratch to compile to SQM, and so this method would not be needed in 6.0Used during "compiling" a JPA criteria query.- Type Parameters:
T
- The query type- Parameters:
jpaqlString
- The criteria query rendered as a JPA QL stringresultClass
- The result type (the type expected in the result list)selection
- The selection(s)queryOptions
- The options to use to build the query.- Returns:
- The typed query
-
-