public interface SessionImplementor extends Session, SharedSessionContractImplementor, HibernateEntityManagerImplementor
Defines the "internal contract" for Session and other parts of Hibernate such as
Type, EntityPersister
and CollectionPersister implementations.
A Session, through this interface and SharedSessionContractImplementor, implements:<ul>
<li>
JdbcSessionOwner to drive the behavior of the
JdbcSessionContext delegate
</li>
<li>
TransactionCoordinatorBuilder.Options
to drive the creation of the TransactionCoordinator delegate
</li>
<li>
LobCreationContext to act as the context for JDBC LOB instance creation
</li>
<li>
WrapperOptions to fulfill the behavior needed while
binding/extracting values to/from JDBC as part of the Type contracts
</li>
</ul>
See also EventSource which extends this interface providing
bridge to the event generation features of org.hibernate.event
Session.LockRequestLobCreationContext.Callback<T>HibernateEntityManagerImplementor.QueryOptions| Modifier and Type | Method and Description |
|---|---|
QueryImplementor |
createNamedQuery(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.
|
NativeQueryImplementor |
createNativeQuery(String sqlString)
Create a NativeQuery instance for the given native (SQL) query
|
NativeQueryImplementor |
createNativeQuery(String sqlString,
Class resultClass)
Create a NativeQuery instance for the given native (SQL) query using
implicit mapping to the specified Java type.
|
NativeQueryImplementor |
createNativeQuery(String sqlString,
String resultSetMapping)
Create a NativeQuery instance for the given native (SQL) query using
implicit mapping to the specified Java type.
|
QueryImplementor |
createQuery(CriteriaDelete deleteQuery) |
<T> QueryImplementor<T> |
createQuery(CriteriaQuery<T> criteriaQuery) |
QueryImplementor |
createQuery(CriteriaUpdate updateQuery) |
QueryImplementor |
createQuery(String queryString)
Create a
Query instance for the given HQL/JPQL query string. |
<T> QueryImplementor<T> |
createQuery(String queryString,
Class<T> resultType)
Create a typed
Query instance for the given HQL/JPQL query string. |
<T> QueryImplementor<T> |
createQuery(String jpaqlString,
Class<T> resultClass,
Selection selection,
HibernateEntityManagerImplementor.QueryOptions queryOptions)
Deprecated.
(since 5.2) - see deprecation note on super
|
NativeQueryImplementor |
createSQLQuery(String sqlString)
Create a
NativeQuery instance for the given SQL query string. |
void |
delete(String entityName,
Object child,
boolean isCascadeDeleteEnabled,
Set transientEntities)
Deprecated.
OperationalContext should cover this overload I believe; Gail?
|
void |
forceFlush(EntityEntry e) |
ActionQueue |
getActionQueue() |
NativeQueryImplementor |
getNamedNativeQuery(String name)
Get a NativeQuery instance for a named native SQL query
|
QueryImplementor |
getNamedQuery(String queryName)
Create a
Query instance for the named query. |
NativeQueryImplementor |
getNamedSQLQuery(String name)
Get a NativeQuery instance for a named native SQL query
|
SessionFactoryImplementor |
getSessionFactory()
Get the session factory which created this session.
|
Object |
instantiate(EntityPersister persister,
Serializable id) |
boolean |
isFlushBeforeCompletionEnabled()
Deprecated.
(since 5.2) use
Session.getHibernateFlushMode() instead. |
void |
merge(String entityName,
Object object,
Map copiedAlready)
Deprecated.
OperationalContext should cover this overload I believe; Gail?
|
void |
persist(String entityName,
Object object,
Map createdAlready)
Deprecated.
OperationalContext should cover this overload I believe; Gail?
|
void |
persistOnFlush(String entityName,
Object object,
Map copiedAlready)
Deprecated.
OperationalContext should cover this overload I believe; Gail?
|
void |
refresh(String entityName,
Object object,
Map refreshedAlready)
Deprecated.
OperationalContext should cover this overload I believe; Gail?
|
void |
removeOrphanBeforeUpdates(String entityName,
Object child)
Deprecated.
OperationalContext should cover this overload I believe; Gail?
|
addEventListeners, buildLockRequest, byId, byId, byMultipleIds, byMultipleIds, byNaturalId, byNaturalId, bySimpleNaturalId, bySimpleNaturalId, cancelQuery, clear, contains, createFilter, delete, delete, disableFetchProfile, disableFilter, disconnect, doReturningWork, doWork, enableFetchProfile, enableFilter, evict, flush, get, get, get, get, get, get, getCacheMode, getCurrentLockMode, getEnabledFilter, 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, updateaccessTransaction, afterScrollOperation, bestGuessEntityName, checkOpen, checkOpen, connection, executeNativeUpdate, executeUpdate, flush, generateEntityKey, getCacheMode, getCacheTransactionSynchronization, getConfiguredJdbcBatchSize, getContextEntityIdentifier, getDontFlushFromFind, getEntityPersister, getEntityUsingInterceptor, getEventListenerManager, getExceptionConverter, getFactory, getFlushMode, getHibernateFlushMode, getInterceptor, getJdbcCoordinator, getJdbcServices, getLoadQueryInfluencers, getPersistenceContext, 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, setFlushMode, setHibernateFlushMode, shouldAutoClosebeginTransaction, close, createCriteria, createCriteria, createCriteria, createCriteria, createStoredProcedureCall, createStoredProcedureCall, createStoredProcedureCall, getJdbcBatchSize, getNamedProcedureCall, getTransaction, isConnected, isOpen, setJdbcBatchSizeafterTransactionBegin, afterTransactionCompletion, beforeTransactionCompletion, flushBeforeTransactionCompletion, getJdbcBatchSize, getJdbcConnectionAccess, getJdbcSessionContext, getTransactionCoordinator, startTransactionBoundaryshouldAutoJoinTransactionexecutegetJdbcTimeZone, getLobCreator, remapSqlTypeDescriptor, useStreamForLobBindingbuildLockOptions, checkOpen, getLockRequest, getSession, isTransactionInProgress, markForRollbackOnlyclose, contains, createEntityGraph, createEntityGraph, createNamedStoredProcedureQuery, createStoredProcedureQuery, createStoredProcedureQuery, createStoredProcedureQuery, detach, find, find, find, find, getCriteriaBuilder, getDelegate, getEntityGraph, getEntityGraphs, getEntityManagerFactory, getLockMode, getMetamodel, getProperties, getReference, getTransaction, isJoinedToTransaction, isOpen, joinTransaction, lock, lock, refresh, refresh, refresh, remove, setFlushMode, setProperty, unwrapgetFactorySessionFactoryImplementor getSessionFactory()
SessionGet the session factory which created this session.
getSessionFactory in interface SessionSessionFactory@Deprecated boolean isFlushBeforeCompletionEnabled()
Session.getHibernateFlushMode() instead.ActionQueue getActionQueue()
Object instantiate(EntityPersister persister, Serializable id) throws HibernateException
HibernateExceptionvoid forceFlush(EntityEntry e) throws HibernateException
HibernateExceptionQueryImplementor createQuery(String queryString)
QueryProducerCreate a Query instance for the given HQL/JPQL query string.
createQuery in interface EntityManagercreateQuery in interface QueryProducercreateQuery in interface QueryProducerImplementorcreateQuery in interface SessionqueryString - The HQL/JPQL queryEntityManager.createQuery(String)<T> QueryImplementor<T> createQuery(String queryString, Class<T> resultType)
QueryProducerCreate a typed Query instance for the given HQL/JPQL query string.
createQuery in interface EntityManagercreateQuery in interface QueryProducercreateQuery in interface QueryProducerImplementorcreateQuery in interface SessionqueryString - The HQL/JPQL queryEntityManager.createQuery(String,Class)<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 in interface EntityManagercreateNamedQuery in interface QueryProducercreateNamedQuery in interface QueryProducerImplementorcreateNamedQuery in interface Sessionname - the name of a query defined in metadataresultType - the type of the query resultEntityManager.createNamedQuery(String,Class)QueryImplementor createNamedQuery(String name)
QueryProducerThe JPA-defined named query creation method. This form can represent an HQL/JPQL query or a native query.
createNamedQuery in interface EntityManagercreateNamedQuery in interface QueryProducercreateNamedQuery in interface QueryProducerImplementorname - the name of a pre-defined, named queryEntityManager.createNamedQuery(String)NativeQueryImplementor createNativeQuery(String sqlString)
QueryProducerCreate a NativeQuery instance for the given native (SQL) query
createNativeQuery in interface EntityManagercreateNativeQuery in interface QueryProducercreateNativeQuery in interface QueryProducerImplementorsqlString - a native SQL query stringEntityManager.createNativeQuery(String)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 in interface EntityManagercreateNativeQuery in interface QueryProducercreateNativeQuery in interface QueryProducerImplementorsqlString - Native (SQL) query stringresultClass - The Java type to map results toEntityManager.createNativeQuery(String,Class)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 in interface EntityManagercreateNativeQuery in interface QueryProducercreateNativeQuery in interface QueryProducerImplementorsqlString - Native (SQL) query stringresultSetMapping - The explicit (named) result mappingEntityManager.createNativeQuery(String,Class),
SqlResultSetMappingNativeQueryImplementor createSQLQuery(String sqlString)
QueryProducerCreate a NativeQuery instance for the given SQL query string.
createSQLQuery in interface QueryProducercreateSQLQuery in interface QueryProducerImplementorcreateSQLQuery in interface SessionsqlString - The SQL queryNativeQueryImplementor getNamedNativeQuery(String name)
QueryProducerGet a NativeQuery instance for a named native SQL query
getNamedNativeQuery in interface QueryProducergetNamedNativeQuery in interface QueryProducerImplementorname - The name of the pre-defined queryQueryImplementor getNamedQuery(String queryName)
QueryProducerCreate a Query instance for the named query.
getNamedQuery in interface QueryProducergetNamedQuery in interface QueryProducerImplementorgetNamedQuery in interface SessionqueryName - the name of a pre-defined, named queryNativeQueryImplementor getNamedSQLQuery(String name)
QueryProducerGet a NativeQuery instance for a named native SQL query
getNamedSQLQuery in interface QueryProducergetNamedSQLQuery in interface QueryProducerImplementorname - The name of the pre-defined query<T> QueryImplementor<T> createQuery(CriteriaQuery<T> criteriaQuery)
createQuery in interface EntityManagercreateQuery in interface SessionQueryImplementor createQuery(CriteriaUpdate updateQuery)
createQuery in interface EntityManagercreateQuery in interface SessionQueryImplementor createQuery(CriteriaDelete deleteQuery)
createQuery in interface EntityManagercreateQuery in interface Session@Deprecated <T> QueryImplementor<T> createQuery(String jpaqlString, Class<T> resultClass, Selection selection, HibernateEntityManagerImplementor.QueryOptions queryOptions)
Used during "compiling" a JPA criteria query.
createQuery in interface HibernateEntityManagerImplementorT - The query typejpaqlString - 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.@Deprecated void merge(String entityName, Object object, Map copiedAlready) throws HibernateException
HibernateException@Deprecated void persist(String entityName, Object object, Map createdAlready) throws HibernateException
HibernateException@Deprecated void persistOnFlush(String entityName, Object object, Map copiedAlready)
@Deprecated void refresh(String entityName, Object object, Map refreshedAlready) throws HibernateException
HibernateException@Deprecated void delete(String entityName, Object child, boolean isCascadeDeleteEnabled, Set transientEntities)
@Deprecated void removeOrphanBeforeUpdates(String entityName, Object child)
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.