接口 SessionImplementor
-
- 所有超级接口:
AutoCloseable,Closeable,javax.persistence.EntityManager,HibernateEntityManager,HibernateEntityManager,HibernateEntityManagerFactoryAware,HibernateEntityManagerImplementor,JdbcSessionOwner,LobCreationContext,QueryProducer,QueryProducerImplementor,Serializable,Session,SharedSessionContract,SharedSessionContractImplementor,TransactionCoordinatorBuilder.Options,WrapperOptions
- 所有已知子接口:
EventSource
public interface SessionImplementor extends Session, SharedSessionContractImplementor, HibernateEntityManagerImplementor
Defines the "internal contract" forSessionand other parts of Hibernate such asType,EntityPersisterandCollectionPersisterimplementations. A Session, through this interface and SharedSessionContractImplementor, implements:-
JdbcSessionOwnerto drive the behavior of theJdbcSessionContextdelegate -
TransactionCoordinatorBuilder.Optionsto drive the creation of theTransactionCoordinatordelegate -
LobCreationContextto act as the context for JDBC LOB instance creation -
WrapperOptionsto fulfill the behavior needed while binding/extracting values to/from JDBC as part of the Type contracts
EventSourcewhich extends this interface providing bridge to the event generation features oforg.hibernate.event- 作者:
- Gavin King, Steve Ebersole
-
-
嵌套类概要
-
从接口继承的嵌套类/接口 org.hibernate.jpa.spi.HibernateEntityManagerImplementor
HibernateEntityManagerImplementor.QueryOptions
-
从接口继承的嵌套类/接口 org.hibernate.engine.jdbc.LobCreationContext
LobCreationContext.Callback<T>
-
从接口继承的嵌套类/接口 org.hibernate.Session
Session.LockRequest
-
-
方法概要
所有方法 实例方法 抽象方法 已过时的方法 修饰符和类型 方法 说明 <T> RootGraphImplementor<T>createEntityGraph(Class<T> rootType)RootGraphImplementor<?>createEntityGraph(String graphName)QueryImplementorcreateNamedQuery(String name)The JPA-defined named query creation method.<T> QueryImplementor<T>createNamedQuery(String name, Class<T> resultType)The JPA-defined named, typed query creation method.NativeQueryImplementorcreateNativeQuery(String sqlString)Create a NativeQuery instance for the given native (SQL) queryNativeQueryImplementorcreateNativeQuery(String sqlString, Class resultClass)Create a NativeQuery instance for the given native (SQL) query using implicit mapping to the specified Java type.NativeQueryImplementorcreateNativeQuery(String sqlString, String resultSetMapping)Create a NativeQuery instance for the given native (SQL) query using implicit mapping to the specified Java type.QueryImplementorcreateQuery(String queryString)Create aQueryinstance for the given HQL/JPQL query string.<T> QueryImplementor<T>createQuery(String queryString, Class<T> resultType)Create a typedQueryinstance for the given HQL/JPQL query string.<T> QueryImplementor<T>createQuery(String jpaqlString, Class<T> resultClass, javax.persistence.criteria.Selection selection, HibernateEntityManagerImplementor.QueryOptions queryOptions)已过时。(since 5.2) - see deprecation note on superQueryImplementorcreateQuery(javax.persistence.criteria.CriteriaDelete deleteQuery)<T> QueryImplementor<T>createQuery(javax.persistence.criteria.CriteriaQuery<T> criteriaQuery)QueryImplementorcreateQuery(javax.persistence.criteria.CriteriaUpdate updateQuery)NativeQueryImplementorcreateSQLQuery(String sqlString)Create aNativeQueryinstance for the given SQL query string.voiddelete(String entityName, Object child, boolean isCascadeDeleteEnabled, Set transientEntities)已过时。OperationalContext should cover this overload I believe; Gail?voidforceFlush(EntityEntry e)ActionQueuegetActionQueue()RootGraphImplementor<?>getEntityGraph(String graphName)NativeQueryImplementorgetNamedNativeQuery(String name)Get a NativeQuery instance for a named native SQL queryQueryImplementorgetNamedQuery(String queryName)Create aQueryinstance for the named query.NativeQueryImplementorgetNamedSQLQuery(String name)Get a NativeQuery instance for a named native SQL querySessionFactoryImplementorgetSessionFactory()Get the session factory which created this session.Objectinstantiate(EntityPersister persister, Serializable id)booleanisFlushBeforeCompletionEnabled()已过时。(since 5.2) useSession.getHibernateFlushMode()instead.voidmerge(String entityName, Object object, Map copiedAlready)已过时。OperationalContext should cover this overload I believe; Gail?voidpersist(String entityName, Object object, Map createdAlready)已过时。OperationalContext should cover this overload I believe; Gail?voidpersistOnFlush(String entityName, Object object, Map copiedAlready)已过时。OperationalContext should cover this overload I believe; Gail?voidrefresh(String entityName, Object object, Map refreshedAlready)已过时。OperationalContext should cover this overload I believe; Gail?voidremoveOrphanBeforeUpdates(String entityName, Object child)已过时。OperationalContext should cover this overload I believe; Gail?-
从接口继承的方法 javax.persistence.EntityManager
close, contains, createNamedStoredProcedureQuery, createStoredProcedureQuery, createStoredProcedureQuery, createStoredProcedureQuery, detach, find, find, find, find, getCriteriaBuilder, getDelegate, getEntityManagerFactory, getLockMode, getMetamodel, getProperties, getReference, getTransaction, isJoinedToTransaction, isOpen, joinTransaction, lock, lock, refresh, refresh, refresh, remove, setFlushMode, setProperty, unwrap
-
从接口继承的方法 org.hibernate.jpa.spi.HibernateEntityManagerFactoryAware
getFactory
-
从接口继承的方法 org.hibernate.jpa.spi.HibernateEntityManagerImplementor
buildLockOptions, checkOpen, getLockRequest, getSession, isTransactionInProgress, markForRollbackOnly
-
从接口继承的方法 org.hibernate.resource.jdbc.spi.JdbcSessionOwner
afterTransactionBegin, afterTransactionCompletion, beforeTransactionCompletion, flushBeforeTransactionCompletion, getJdbcBatchSize, getJdbcConnectionAccess, getJdbcSessionContext, getTransactionCoordinator, startTransactionBoundary
-
从接口继承的方法 org.hibernate.engine.jdbc.LobCreationContext
execute
-
从接口继承的方法 org.hibernate.Session
addEventListeners, buildLockRequest, byId, byId, byMultipleIds, byMultipleIds, byNaturalId, byNaturalId, bySimpleNaturalId, bySimpleNaturalId, cancelQuery, clear, contains, createFilter, delete, delete, disableFetchProfile, disableFilter, disconnect, enableFetchProfile, enableFilter, evict, flush, get, get, get, get, get, get, getCacheMode, getCurrentLockMode, getEnabledFilter, getEntityGraphs, getEntityName, getFlushMode, getHibernateFlushMode, getIdentifier, getLobHelper, getStatistics, getTypeHelper, isDefaultReadOnly, isDirty, isFetchProfileEnabled, isReadOnly, load, load, load, load, load, load, load, lock, lock, merge, merge, persist, persist, reconnect, refresh, refresh, refresh, refresh, refresh, replicate, replicate, save, save, saveOrUpdate, saveOrUpdate, sessionWithOptions, setCacheMode, setDefaultReadOnly, setFlushMode, setHibernateFlushMode, setReadOnly, update, update
-
从接口继承的方法 org.hibernate.SharedSessionContract
beginTransaction, close, createCriteria, createCriteria, createCriteria, createCriteria, createStoredProcedureCall, createStoredProcedureCall, createStoredProcedureCall, doReturningWork, doWork, getJdbcBatchSize, getNamedProcedureCall, getTransaction, isConnected, isOpen, setJdbcBatchSize
-
从接口继承的方法 org.hibernate.engine.spi.SharedSessionContractImplementor
accessTransaction, afterScrollOperation, bestGuessEntityName, checkOpen, checkOpen, checkTransactionNeededForUpdateOperation, connection, executeNativeUpdate, executeUpdate, flush, generateEntityKey, getCacheMode, getCacheTransactionSynchronization, getConfiguredJdbcBatchSize, getContextEntityIdentifier, getDontFlushFromFind, getEntityPersister, getEntityUsingInterceptor, getEventListenerManager, getExceptionConverter, getFactory, getFetchGraphLoadContext, getFlushMode, getHibernateFlushMode, getInterceptor, getJdbcCoordinator, getJdbcServices, getLoadQueryInfluencers, getPersistenceContext, getPersistenceContextInternal, getSessionIdentifier, getTenantIdentifier, getTimestamp, getTransactionStartTimestamp, guessEntityName, immediateLoad, initializeCollection, instantiate, internalLoad, isAutoCloseSessionEnabled, isClosed, isEventSource, isOpenOrWaitingForAutoClose, isQueryParametersValidationEnabled, isTransactionInProgress, iterate, iterateFilter, list, list, list, listCustomQuery, listFilter, markForRollbackOnly, scroll, scroll, scroll, scrollCustomQuery, setAutoClear, setCacheMode, setFetchGraphLoadContext, setFlushMode, setHibernateFlushMode, shouldAutoClose
-
从接口继承的方法 org.hibernate.resource.transaction.spi.TransactionCoordinatorBuilder.Options
shouldAutoJoinTransaction
-
从接口继承的方法 org.hibernate.type.descriptor.WrapperOptions
getJdbcTimeZone, getLobCreator, remapSqlTypeDescriptor, useStreamForLobBinding
-
-
-
-
方法详细资料
-
getSessionFactory
SessionFactoryImplementor getSessionFactory()
从接口复制的说明:SessionGet the session factory which created this session.- 指定者:
getSessionFactory在接口中Session- 返回:
- The session factory.
- 另请参阅:
SessionFactory
-
createEntityGraph
<T> RootGraphImplementor<T> createEntityGraph(Class<T> rootType)
- 指定者:
createEntityGraph在接口中javax.persistence.EntityManager- 指定者:
createEntityGraph在接口中Session
-
createEntityGraph
RootGraphImplementor<?> createEntityGraph(String graphName)
- 指定者:
createEntityGraph在接口中javax.persistence.EntityManager- 指定者:
createEntityGraph在接口中Session
-
getEntityGraph
RootGraphImplementor<?> getEntityGraph(String graphName)
- 指定者:
getEntityGraph在接口中javax.persistence.EntityManager- 指定者:
getEntityGraph在接口中Session
-
isFlushBeforeCompletionEnabled
@Deprecated boolean isFlushBeforeCompletionEnabled()
已过时。(since 5.2) useSession.getHibernateFlushMode()instead.
-
getActionQueue
ActionQueue getActionQueue()
-
instantiate
Object instantiate(EntityPersister persister, Serializable id) throws HibernateException
-
forceFlush
void forceFlush(EntityEntry e) throws HibernateException
-
createQuery
QueryImplementor createQuery(String queryString)
从接口复制的说明:QueryProducerCreate aQueryinstance for the given HQL/JPQL query string.- 指定者:
createQuery在接口中javax.persistence.EntityManager- 指定者:
createQuery在接口中QueryProducer- 指定者:
createQuery在接口中QueryProducerImplementor- 指定者:
createQuery在接口中SharedSessionContract- 参数:
queryString- The HQL/JPQL query- 返回:
- The Query instance for manipulation and execution
- 另请参阅:
EntityManager.createQuery(String)
-
createQuery
<T> QueryImplementor<T> createQuery(String queryString, Class<T> resultType)
从接口复制的说明:QueryProducerCreate a typedQueryinstance for the given HQL/JPQL query string.- 指定者:
createQuery在接口中javax.persistence.EntityManager- 指定者:
createQuery在接口中QueryProducer- 指定者:
createQuery在接口中QueryProducerImplementor- 指定者:
createQuery在接口中Session- 参数:
queryString- The HQL/JPQL query- 返回:
- The Query instance for manipulation and execution
- 另请参阅:
EntityManager.createQuery(String,Class)
-
createNamedQuery
<T> QueryImplementor<T> createNamedQuery(String name, Class<T> resultType)
从接口复制的说明:QueryProducerThe JPA-defined named, typed query creation method. This form can only represent an HQL/JPQL query (not a native query).- 指定者:
createNamedQuery在接口中javax.persistence.EntityManager- 指定者:
createNamedQuery在接口中QueryProducer- 指定者:
createNamedQuery在接口中QueryProducerImplementor- 指定者:
createNamedQuery在接口中Session- 参数:
name- the name of a query defined in metadataresultType- the type of the query result- 返回:
- The Query instance for manipulation and execution
- 另请参阅:
EntityManager.createNamedQuery(String,Class)
-
createNamedQuery
QueryImplementor createNamedQuery(String name)
从接口复制的说明:QueryProducerThe JPA-defined named query creation method. This form can represent an HQL/JPQL query or a native query.- 指定者:
createNamedQuery在接口中javax.persistence.EntityManager- 指定者:
createNamedQuery在接口中QueryProducer- 指定者:
createNamedQuery在接口中QueryProducerImplementor- 参数:
name- the name of a pre-defined, named query- 返回:
- The Query instance for manipulation and execution
- 另请参阅:
EntityManager.createNamedQuery(String)
-
createNativeQuery
NativeQueryImplementor createNativeQuery(String sqlString)
从接口复制的说明:QueryProducerCreate a NativeQuery instance for the given native (SQL) query- 指定者:
createNativeQuery在接口中javax.persistence.EntityManager- 指定者:
createNativeQuery在接口中QueryProducer- 指定者:
createNativeQuery在接口中QueryProducerImplementor- 参数:
sqlString- a native SQL query string- 返回:
- The NativeQuery instance for manipulation and execution
- 另请参阅:
EntityManager.createNativeQuery(String)
-
createNativeQuery
NativeQueryImplementor createNativeQuery(String sqlString, Class resultClass)
从接口复制的说明:QueryProducerCreate a NativeQuery instance for the given native (SQL) query using implicit mapping to the specified Java type.- 指定者:
createNativeQuery在接口中javax.persistence.EntityManager- 指定者:
createNativeQuery在接口中QueryProducer- 指定者:
createNativeQuery在接口中QueryProducerImplementor- 参数:
sqlString- Native (SQL) query stringresultClass- The Java type to map results to- 返回:
- The NativeQuery instance for manipulation and execution
- 另请参阅:
EntityManager.createNativeQuery(String,Class)
-
createNativeQuery
NativeQueryImplementor createNativeQuery(String sqlString, String resultSetMapping)
从接口复制的说明:QueryProducerCreate a NativeQuery instance for the given native (SQL) query using implicit mapping to the specified Java type.- 指定者:
createNativeQuery在接口中javax.persistence.EntityManager- 指定者:
createNativeQuery在接口中QueryProducer- 指定者:
createNativeQuery在接口中QueryProducerImplementor- 参数:
sqlString- Native (SQL) query stringresultSetMapping- The explicit (named) result mapping- 返回:
- The NativeQuery instance for manipulation and execution
- 另请参阅:
EntityManager.createNativeQuery(String,Class),SqlResultSetMapping
-
createSQLQuery
NativeQueryImplementor createSQLQuery(String sqlString)
从接口复制的说明:QueryProducerCreate aNativeQueryinstance for the given SQL query string.- 指定者:
createSQLQuery在接口中QueryProducer- 指定者:
createSQLQuery在接口中QueryProducerImplementor- 指定者:
createSQLQuery在接口中Session- 参数:
sqlString- The SQL query- 返回:
- The query instance for manipulation and execution
-
getNamedNativeQuery
NativeQueryImplementor getNamedNativeQuery(String name)
从接口复制的说明:QueryProducerGet a NativeQuery instance for a named native SQL query- 指定者:
getNamedNativeQuery在接口中QueryProducer- 指定者:
getNamedNativeQuery在接口中QueryProducerImplementor- 参数:
name- The name of the pre-defined query- 返回:
- The NativeQuery instance for manipulation and execution
-
getNamedQuery
QueryImplementor getNamedQuery(String queryName)
从接口复制的说明:QueryProducerCreate aQueryinstance for the named query.- 指定者:
getNamedQuery在接口中QueryProducer- 指定者:
getNamedQuery在接口中QueryProducerImplementor- 指定者:
getNamedQuery在接口中SharedSessionContract- 参数:
queryName- the name of a pre-defined, named query- 返回:
- The Query instance for manipulation and execution
-
getNamedSQLQuery
NativeQueryImplementor getNamedSQLQuery(String name)
从接口复制的说明:QueryProducerGet a NativeQuery instance for a named native SQL query- 指定者:
getNamedSQLQuery在接口中QueryProducer- 指定者:
getNamedSQLQuery在接口中QueryProducerImplementor- 参数:
name- The name of the pre-defined query- 返回:
- The NativeQuery instance for manipulation and execution
-
createQuery
<T> QueryImplementor<T> createQuery(javax.persistence.criteria.CriteriaQuery<T> criteriaQuery)
- 指定者:
createQuery在接口中javax.persistence.EntityManager- 指定者:
createQuery在接口中QueryProducer- 指定者:
createQuery在接口中Session
-
createQuery
QueryImplementor createQuery(javax.persistence.criteria.CriteriaUpdate updateQuery)
- 指定者:
createQuery在接口中javax.persistence.EntityManager- 指定者:
createQuery在接口中QueryProducer- 指定者:
createQuery在接口中Session
-
createQuery
QueryImplementor createQuery(javax.persistence.criteria.CriteriaDelete deleteQuery)
- 指定者:
createQuery在接口中javax.persistence.EntityManager- 指定者:
createQuery在接口中QueryProducer- 指定者:
createQuery在接口中Session
-
createQuery
@Deprecated <T> QueryImplementor<T> createQuery(String jpaqlString, Class<T> resultClass, javax.persistence.criteria.Selection selection, HibernateEntityManagerImplementor.QueryOptions queryOptions)
已过时。(since 5.2) - see deprecation note on superUsed during "compiling" a JPA criteria query.- 指定者:
createQuery在接口中HibernateEntityManagerImplementor- 指定者:
createQuery在接口中SharedSessionContractImplementor- 类型参数:
T- The query type- 参数:
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.- 返回:
- The typed query
-
merge
@Deprecated void merge(String entityName, Object object, Map copiedAlready) throws HibernateException
已过时。OperationalContext should cover this overload I believe; Gail?
-
persist
@Deprecated void persist(String entityName, Object object, Map createdAlready) throws HibernateException
已过时。OperationalContext should cover this overload I believe; Gail?
-
persistOnFlush
@Deprecated void persistOnFlush(String entityName, Object object, Map copiedAlready)
已过时。OperationalContext should cover this overload I believe; Gail?
-
refresh
@Deprecated void refresh(String entityName, Object object, Map refreshedAlready) throws HibernateException
已过时。OperationalContext should cover this overload I believe; Gail?
-
delete
@Deprecated void delete(String entityName, Object child, boolean isCascadeDeleteEnabled, Set transientEntities)
已过时。OperationalContext should cover this overload I believe; Gail?
-
removeOrphanBeforeUpdates
@Deprecated void removeOrphanBeforeUpdates(String entityName, Object child)
已过时。OperationalContext should cover this overload I believe; Gail?
-
-