Class SharedSessionDelegatorBaseImpl
- All Implemented Interfaces:
Closeable
,Serializable
,AutoCloseable
,LobCreationContext
,SharedSessionContractImplementor
,QueryProducer
,QueryProducerImplementor
,JdbcSessionOwner
,TransactionCoordinatorBuilder.Options
,SharedSessionContract
,JavaType.CoercionContext
,WrapperOptions
SharedSessionContractImplementor
. This is useful for custom implementations
of that API, so that only some methods need to be overridden- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.engine.jdbc.LobCreationContext
LobCreationContext.Callback<T>
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the currentTransaction
, or creates a new transaction if there is no transaction active.void
afterOperation
(boolean success) Check if there is a Hibernate or JTA transaction in progress and, if there is not, flush if necessary, making sure that the connection has been committed (if it is not in autocommit mode), and finally run the after completion processing.void
Called after each operation on aScrollableResults
, providing an opportunity for a stateless session to clear its temporary persistence context.void
A after-begin callback from the coordinator to its owner.void
afterTransactionCompletion
(boolean successful, boolean delayed) An after-completion callback to the owner.boolean
autoFlushIfRequired
(Set<String> querySpaces) detect in-memory changes, determine if the changes are to tables named in the query and, if so, complete execution the flushboolean
autoFlushIfRequired
(Set<String> querySpaces, boolean skipPreFlush) void
void
A before-completion callback to the owner.Begin a unit of work and return the associatedTransaction
object.bestGuessEntityName
(Object object) Obtain the best estimate of the entity name of the given entity instance, which is not involved in an association, by also considering information held in the proxy, and whether the object is already associated with this session.void
checkOpen
(boolean markForRollbackIfClosed) Check whether the session is open, and if not: ifmarkForRollbackIfClosed = true
, mark the current transaction, if any, for rollback only, and throw anIllegalStateException
.void
close()
End the session by releasing the JDBC connection and cleaning up.<T> RootGraph<T>
createEntityGraph
(Class<T> rootType) Create a new mutableEntityGraph
with only a root node.<T> RootGraph<T>
createEntityGraph
(Class<T> rootType, String graphName) Create a new mutable copy of the namedEntityGraph
, or returnnull
if there is no graph with the given name.RootGraph<?>
createEntityGraph
(String graphName) Create a new mutable copy of the namedEntityGraph
, or returnnull
if there is no graph with the given name.createMutationQuery
(CriteriaDelete deleteQuery) Create aMutationQuery
from the given delete criteria treecreateMutationQuery
(CriteriaUpdate updateQuery) Create aMutationQuery
from the given update criteria treecreateMutationQuery
(String statementString) Create aMutationQuery
reference for the given HQL insert, update, or delete statement.createMutationQuery
(JpaCriteriaInsert insertSelect) Create aMutationQuery
from the given insert criteria treecreateMutationQuery
(JpaCriteriaInsertSelect insertSelect) Create aMutationQuery
from the given insert-select criteria treeCreate aMutationQuery
instance for the given named insert, update, or delete HQL query.createNamedQuery
(String name) Create a typedQuery
instance for the given named query.<T> QueryImplementor<T>
createNamedQuery
(String name, Class<T> resultClass) Create a typedQuery
instance for the given named query.Create aSelectionQuery
instance for the namedNamedQuery
.<R> SelectionQuery<R>
createNamedSelectionQuery
(String name, Class<R> resultType) Create aSelectionQuery
instance for the namedNamedQuery
with the given result type.Obtain aProcedureCall
based on a named templatecreateNativeMutationQuery
(String sqlString) Create aNativeQuery
instance for the given native SQL statement.createNativeQuery
(String sqlString) Create aNativeQuery
instance for the given native SQL query.createNativeQuery
(String sqlString, Class resultClass) Create aNativeQuery
instance for the given native SQL query using an implicit mapping to the specified Java type.<T> NativeQueryImplementor<T>
createNativeQuery
(String sqlString, Class<T> resultClass, String tableAlias) Create aNativeQuery
instance for the given native SQL query using an implicit mapping to the specified Java entity type.createNativeQuery
(String sqlString, String resultSetMappingName) Create aNativeQuery
instance for the given native SQL query using an explicit mapping to the specified Java type.<T> NativeQueryImplementor<T>
createNativeQuery
(String sqlString, String resultSetMappingName, Class<T> resultClass) Create aNativeQuery
instance for the given native SQL query using an explicit mapping to the specified Java type.createQuery
(CriteriaDelete deleteQuery) Create aMutationQuery
for the given JPACriteriaDelete
<T> QueryImplementor<T>
createQuery
(CriteriaQuery<T> criteriaQuery) Create aQuery
for the given JPACriteriaQuery
.createQuery
(CriteriaUpdate updateQuery) Create aMutationQuery
for the given JPACriteriaUpdate
createQuery
(String queryString) Create aQuery
instance for the given HQL query, or HQL insert, update, or delete statement.<T> QueryImplementor<T>
createQuery
(String queryString, Class<T> resultType) Create a typedQuery
instance for the given HQL query string and given query result type.<R> SelectionQuery<R>
createSelectionQuery
(CriteriaQuery<R> criteria) Create aSelectionQuery
reference for the givenCriteriaQuery
.createSelectionQuery
(String hqlString) Create aSelectionQuery
reference for the given HQLselect
statement.<R> SelectionQuery<R>
createSelectionQuery
(String hqlString, Class<R> resultType) Create aSelectionQuery
instance for the given HQL query string and given query result type.createStoredProcedureCall
(String procedureName) Create aProcedureCall
to a stored procedure.createStoredProcedureCall
(String procedureName, Class<?>... resultClasses) Create aProcedureCall
to a stored procedure with the given result set entity mappings.createStoredProcedureCall
(String procedureName, String... resultSetMappings) Create aProcedureCall
to a stored procedure with the given result set entity mappings.createStoredProcedureQuery
(String procedureName) Create aProcedureCall
to a stored procedure.createStoredProcedureQuery
(String procedureName, Class<?>... resultClasses) Create aProcedureCall
to a stored procedure with the given result set entity mappings.createStoredProcedureQuery
(String procedureName, String... resultSetMappings) Create aProcedureCall
to a stored procedure with the given result set entity mappings.protected SharedSessionContract
delegate()
Returns the delegate session.void
disableFilter
(String filterName) Disable the named filter for the current session.<T> T
doReturningWork
(ReturningWork<T> work) Perform work using theConnection
underlying by this session, and return a result.void
Perform work using theConnection
underlying by this session.enableFilter
(String filterName) Enable the named filter for this current session.<T> T
execute
(LobCreationContext.Callback<T> callback) Execute the given callback, making sure it has access to a viable JDBCConnection
.void
flush()
Flush this session.void
generateEntityKey
(Object id, EntityPersister persister) Instantiate anEntityKey
with the given id and for the entity represented by the givenEntityPersister
.Get the currentCacheMode
for this session.The currentCacheTransactionSynchronization
associated with this session.getContextEntityIdentifier
(Object object) Return the identifier of the persistent object, or null if it is not associated with this session.getEnabledFilter
(String filterName) Retrieve a currently enabled filter by name.RootGraph<?>
getEntityGraph
(String graphName) Retrieve the namedEntityGraph
as an immutable graph, or returnnull
if there is no graph with the given name.<T> List<EntityGraph<? super T>>
getEntityGraphs
(Class<T> entityClass) Retrieve all namedEntityGraph
s with the given type.getEntityPersister
(@Nullable String entityName, Object object) Get theEntityPersister
for the given entity instance.Get the entity instance associated with the givenEntityKey
, calling theInterceptor
if necessary.Get theSessionEventListenerManager
associated with this session.Obtain anExceptionConverter
for reporting an error.Obtain the factory which created this session.Get the currentFlushModeType
for this session.Get the currentFlushMode
for this session.Retrieves theInterceptor
associated with this session.Get the session-level JDBC batch size for the current session.Obtain theJdbcCoordinator
for this session.Obtain theJdbcServices
for the factory which created this session.The JDBCTimeZone
used when writing a value of typeTime
orTimestamp
to a JDBCPreparedStatement
, or when reading from a JDBCResultSet
.Get theLoadQueryInfluencers
associated with this session.Obtain access to theLobCreator
.getNamedNativeQuery
(String name) Get aNativeQuery
instance for a named native SQL querygetNamedNativeQuery
(String name, String resultSetMapping) Get aNativeQuery
instance for a named native SQL querygetNamedProcedureCall
(String name) Obtain aProcedureCall
based on a named templategetNamedQuery
(String name) Create aQuery
instance for the named query.boolean
Get the persistence context for this session.Similar toSharedSessionContractImplementor.getPersistenceContext()
, with two differences: this version performs better as it allows for inlining and probably better prediction, and it skips some checks of the current state of the session.int
The JDBCtype code
used to bind a null boolean value.Obtain aUUID
which uniquely identifies this session.Obtain the tenant identifier associated with this session.Obtain the tenant identifier associated with this session.Get theTransaction
instance associated with this session.Obtain the builder for TransactionCoordinator instancesguessEntityName
(Object entity) Obtain an estimate of the entity name of the given entity instance, which is not involved in an association, using only theEntityNameResolver
.immediateLoad
(String entityName, Object id) Load an instance immediately.void
initializeCollection
(PersistentCollection<?> collection, boolean writing) Initialize the given collection (if not already initialized).instantiate
(String entityName, Object id) Instantiate the entity class, initializing with the given identifier.instantiate
(EntityPersister persister, Object id) Instantiate the entity class of the givenEntityPersister
, initializing the new instance with the given identifier.internalLoad
(String entityName, Object id, boolean eager, boolean nullable) Obtain an entity instance with the given id, without checking if it was deleted or scheduled for deletion.boolean
Is auto-close at transaction completion enabled?boolean
isClosed()
Determines whether the session is closed.boolean
Check if the session is currently connected.boolean
boolean
Are entities and proxies loaded by this session read-only by default?boolean
Check if the session is joined to the current transaction.boolean
isOpen()
Check if the session is still open.boolean
Does this session have an active Hibernate transaction, or is it associated with a JTA transaction currently in progress?void
Join the currently-active JTA transaction.void
Marks current transaction, if any, for rollback only.void
prepareForQueryExecution
(boolean requiresTxn) Prepare for the execution of aQuery
orProcedureCall
void
setAutoClear
(boolean enabled) Enable or disable automatic cache clearing from after transaction completion.void
Set the currentCacheMode
for this session.void
setCriteriaCopyTreeEnabled
(boolean jpaCriteriaCopyComplianceEnabled) void
setHibernateFlushMode
(FlushMode flushMode) Set the currentFlushMode
for this session.void
setJdbcBatchSize
(Integer jdbcBatchSize) Set the session-level JDBC batch size.void
setNativeJdbcParametersIgnored
(boolean nativeJdbcParametersIgnored) boolean
Should this session be automatically closed after the current transaction completes?boolean
Indicates whether an active transaction should be automatically joined.void
Callback indicating recognition of entering into a transactional context whether that is explicitly via the HibernateTransaction
API or via registration of Hibernate's JTA Synchronization impl with a JTA Transactionboolean
Determines whether streams should be used for binding LOB values.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.hibernate.resource.jdbc.spi.JdbcSessionOwner
getSqlExceptionHelper
Methods inherited from interface org.hibernate.engine.jdbc.LobCreationContext
fromContext
Methods inherited from interface org.hibernate.engine.spi.SharedSessionContractImplementor
asEventSource, asSessionImplementor, asStatelessSession, bestGuessEntityName, checkOpen, checkTransactionNeededForUpdateOperation, getConfiguredJdbcBatchSize, getSession, getSessionFactory, getSessionToken, getTypeConfiguration, isEnforcingFetchGraph, isEventSource, isOpenOrWaitingForAutoClose, isSessionImplementor, isStatelessSession, setEnforcingFetchGraph
Methods inherited from interface org.hibernate.type.descriptor.WrapperOptions
getDialect
-
Field Details
-
delegate
-
-
Constructor Details
-
SharedSessionDelegatorBaseImpl
-
-
Method Details
-
delegate
Returns the delegate session. -
getTenantIdentifier
Description copied from interface:SharedSessionContract
Obtain the tenant identifier associated with this session.- Specified by:
getTenantIdentifier
in interfaceSharedSessionContract
- Returns:
- The tenant identifier associated with this session, or
null
-
getTenantIdentifierValue
Description copied from interface:SharedSessionContract
Obtain the tenant identifier associated with this session.- Specified by:
getTenantIdentifierValue
in interfaceSharedSessionContract
- Returns:
- The tenant identifier associated with this session, or
null
-
createMutationQuery
Description copied from interface:QueryProducer
Create aMutationQuery
from the given update criteria tree- Specified by:
createMutationQuery
in interfaceQueryProducer
- Specified by:
createMutationQuery
in interfaceQueryProducerImplementor
-
createMutationQuery
Description copied from interface:QueryProducer
Create aMutationQuery
from the given delete criteria tree- Specified by:
createMutationQuery
in interfaceQueryProducer
- Specified by:
createMutationQuery
in interfaceQueryProducerImplementor
-
createMutationQuery
Description copied from interface:QueryProducer
Create aMutationQuery
from the given insert-select criteria tree- Specified by:
createMutationQuery
in interfaceQueryProducer
-
createMutationQuery
Description copied from interface:QueryProducer
Create aMutationQuery
from the given insert criteria tree- Specified by:
createMutationQuery
in interfaceQueryProducer
-
createQuery
Description copied from interface:QueryProducer
Create aQuery
for the given JPACriteriaQuery
.- Specified by:
createQuery
in interfaceQueryProducer
- Specified by:
createQuery
in interfaceQueryProducerImplementor
-
createQuery
Description copied from interface:QueryProducer
Create aMutationQuery
for the given JPACriteriaUpdate
- Specified by:
createQuery
in interfaceQueryProducer
- Specified by:
createQuery
in interfaceQueryProducerImplementor
-
createQuery
Description copied from interface:QueryProducer
Create aMutationQuery
for the given JPACriteriaDelete
- Specified by:
createQuery
in interfaceQueryProducer
- Specified by:
createQuery
in interfaceQueryProducerImplementor
-
getNamedQuery
Description copied from interface:QueryProducer
Create aQuery
instance for the named query.- Specified by:
getNamedQuery
in interfaceQueryProducer
- Specified by:
getNamedQuery
in interfaceQueryProducerImplementor
- Parameters:
name
- the name of a predefined named query- Returns:
- The
Query
instance for manipulation and execution
-
getNamedNativeQuery
Description copied from interface:QueryProducer
Get aNativeQuery
instance for a named native SQL query- Specified by:
getNamedNativeQuery
in interfaceQueryProducer
- Specified by:
getNamedNativeQuery
in interfaceQueryProducerImplementor
- Parameters:
name
- The name of the predefined query- Returns:
- The
NativeQuery
instance for manipulation and execution
-
getNamedNativeQuery
Description copied from interface:QueryProducer
Get aNativeQuery
instance for a named native SQL query- Specified by:
getNamedNativeQuery
in interfaceQueryProducer
- Specified by:
getNamedNativeQuery
in interfaceQueryProducerImplementor
- Parameters:
name
- The name of the predefined query- Returns:
- The
NativeQuery
instance for manipulation and execution
-
createQuery
Description copied from interface:QueryProducer
Create aQuery
instance for the given HQL query, or HQL insert, update, or delete statement.If a query has no explicit
select
list, the select list is inferred:- if there is exactly one root entity in the
from
clause, then that root entity is the only element of the select list, or - otherwise, if there are multiple root entities in the
from
clause, then the select list contains every root entity and every non-fetch
joined entity.
- Specified by:
createQuery
in interfaceQueryProducer
- Specified by:
createQuery
in interfaceQueryProducerImplementor
- Parameters:
queryString
- The HQL query- Returns:
- The
Query
instance for manipulation and execution - See Also:
- if there is exactly one root entity in the
-
createSelectionQuery
Description copied from interface:QueryProducer
Create aSelectionQuery
reference for the given HQLselect
statement.If the statement has no explicit
select
list, the select list is inferred:- if there is exactly one root entity in the
from
clause, then that root entity is the only element of the select list, or - otherwise, if there are multiple root entities in the
from
clause, then the select list contains every root entity and every non-fetch
joined entity.
- Specified by:
createSelectionQuery
in interfaceQueryProducer
- if there is exactly one root entity in the
-
createSelectionQuery
Description copied from interface:QueryProducer
Create aSelectionQuery
instance for the given HQL query string and given query result type.- If the query has a single item in the
select
list, then the select item must be assignable to the given result type. - Otherwise, if there are multiple select items, then the
select items will be packaged into an instance of the
result type. The result type must have an appropriate
constructor with parameter types matching the select items,
or it must be one of the types
Object[]
,List
,Map
, orTuple
.
If a query has no explicit
select
list, the select list is inferred from the given query result type:- if the result type is an entity type, the query must have
exactly one root entity in the
from
clause, it must be assignable to the result type, and the inferred select list will contain just that entity, or - otherwise, the select list contains every root entity and
every non-
fetch
joined entity, and each query result will be packaged into an instance of the result type, just as specified above.
The returned
Query
may be executed by callingQuery.getResultList()
orQuery.getSingleResult()
.- Specified by:
createSelectionQuery
in interfaceQueryProducer
- Parameters:
hqlString
- The HQL query as a stringresultType
- TheClass
object representing the query result type- See Also:
- If the query has a single item in the
-
createSelectionQuery
Description copied from interface:QueryProducer
Create aSelectionQuery
reference for the givenCriteriaQuery
.- Specified by:
createSelectionQuery
in interfaceQueryProducer
- See Also:
-
createQuery
Description copied from interface:QueryProducer
Create a typedQuery
instance for the given HQL query string and given query result type.- If the query has a single item in the
select
list, then the select item must be assignable to the given result type. - Otherwise, if there are multiple select items, then the
select items will be packaged into an instance of the
result type. The result type must have an appropriate
constructor with parameter types matching the select items,
or it must be one of the types
Object[]
,List
,Map
, orTuple
.
If a query has no explicit
select
list, the select list is inferred from the given query result type:- if the result type is an entity type, the query must have
exactly one root entity in the
from
clause, it must be assignable to the result type, and the inferred select list will contain just that entity, or - otherwise, the select list contains every root entity and
every non-
fetch
joined entity, and each query result will be packaged into an instance of the result type, just as specified above.
The returned
Query
may be executed by callingQuery.getResultList()
orQuery.getSingleResult()
.- Specified by:
createQuery
in interfaceQueryProducer
- Specified by:
createQuery
in interfaceQueryProducerImplementor
- Parameters:
queryString
- The HQL queryresultType
- The type of the query result- Returns:
- The
Query
instance for manipulation and execution - See Also:
- If the query has a single item in the
-
createNamedQuery
Description copied from interface:QueryProducer
Create a typedQuery
instance for the given named query. The named query might be defined in HQL or in native SQL.- Specified by:
createNamedQuery
in interfaceQueryProducer
- Specified by:
createNamedQuery
in interfaceQueryProducerImplementor
- Parameters:
name
- the name of a predefined named query- Returns:
- The
Query
instance for manipulation and execution - See Also:
-
createNamedQuery
Description copied from interface:QueryProducer
Create a typedQuery
instance for the given named query. The named query might be defined in HQL or in native SQL.- Specified by:
createNamedQuery
in interfaceQueryProducer
- Specified by:
createNamedQuery
in interfaceQueryProducerImplementor
- Parameters:
name
- the name of a query defined in metadataresultClass
- the type of the query result- Returns:
- The
Query
instance for manipulation and execution - See Also:
-
createNamedSelectionQuery
Description copied from interface:QueryProducer
Create aSelectionQuery
instance for the namedNamedQuery
.- Specified by:
createNamedSelectionQuery
in interfaceQueryProducer
-
createNamedSelectionQuery
Description copied from interface:QueryProducer
Create aSelectionQuery
instance for the namedNamedQuery
with the given result type.- Specified by:
createNamedSelectionQuery
in interfaceQueryProducer
-
createNativeQuery
Description copied from interface:QueryProducer
Create aNativeQuery
instance for the given native SQL query.- Specified by:
createNativeQuery
in interfaceQueryProducer
- Specified by:
createNativeQuery
in interfaceQueryProducerImplementor
- Parameters:
sqlString
- a native SQL query string- Returns:
- The
NativeQuery
instance for manipulation and execution - See Also:
-
createNativeQuery
Description copied from interface:QueryProducer
Create aNativeQuery
instance for the given native SQL query using an implicit mapping to the specified Java type.- If the given class is an entity class, this method is equivalent
to
createNativeQuery(sqlString).addEntity(resultClass)
. - If the given class has a registered
JavaType
, then the query must return a result set with a single column whoseJdbcType
is compatible with thatJavaType
. - Otherwise, the select items will be packaged into an instance of
the result type. The result type must have an appropriate
constructor with parameter types matching the select items, or it
must be one of the types
Object[]
,List
,Map
, orTuple
.
- Specified by:
createNativeQuery
in interfaceQueryProducer
- Specified by:
createNativeQuery
in interfaceQueryProducerImplementor
- Parameters:
sqlString
- The native (SQL) query stringresultClass
- The Java type to map results to- Returns:
- The
NativeQuery
instance for manipulation and execution - See Also:
- If the given class is an entity class, this method is equivalent
to
-
createNativeQuery
public <T> NativeQueryImplementor<T> createNativeQuery(String sqlString, Class<T> resultClass, String tableAlias) Description copied from interface:QueryProducer
Create aNativeQuery
instance for the given native SQL query using an implicit mapping to the specified Java entity type.The given class must be an entity class. This method is equivalent to
createNativeQuery(sqlString).addEntity(tableAlias, resultClass)
.- Specified by:
createNativeQuery
in interfaceQueryProducer
- Specified by:
createNativeQuery
in interfaceQueryProducerImplementor
- Parameters:
sqlString
- Native (SQL) query stringresultClass
- The Java entity class to map results totableAlias
- The table alias for columns in the result set- Returns:
- The
NativeQuery
instance for manipulation and execution - See Also:
-
createNativeQuery
Description copied from interface:QueryProducer
Create aNativeQuery
instance for the given native SQL query using an explicit mapping to the specified Java type.The given result set mapping name must identify a mapping defined by a
SqlResultSetMapping
annotation.- Specified by:
createNativeQuery
in interfaceQueryProducer
- Specified by:
createNativeQuery
in interfaceQueryProducerImplementor
- Parameters:
sqlString
- The native (SQL) query stringresultSetMappingName
- The explicit result mapping name- Returns:
- The
NativeQuery
instance for manipulation and execution - See Also:
-
createNativeQuery
public <T> NativeQueryImplementor<T> createNativeQuery(String sqlString, String resultSetMappingName, Class<T> resultClass) Description copied from interface:QueryProducer
Create aNativeQuery
instance for the given native SQL query using an explicit mapping to the specified Java type.The given result set mapping name must identify a mapping defined by a
SqlResultSetMapping
annotation.- Specified by:
createNativeQuery
in interfaceQueryProducer
- Specified by:
createNativeQuery
in interfaceQueryProducerImplementor
- Parameters:
sqlString
- The native (SQL) query stringresultSetMappingName
- The explicit result mapping name- Returns:
- The
NativeQuery
instance for manipulation and execution - See Also:
-
createMutationQuery
Description copied from interface:QueryProducer
Create aMutationQuery
reference for the given HQL insert, update, or delete statement.- Specified by:
createMutationQuery
in interfaceQueryProducer
- Specified by:
createMutationQuery
in interfaceQueryProducerImplementor
-
createNamedMutationQuery
Description copied from interface:QueryProducer
Create aMutationQuery
instance for the given named insert, update, or delete HQL query. The named query might be defined as HQL) or native-SQL.- Specified by:
createNamedMutationQuery
in interfaceQueryProducer
- Specified by:
createNamedMutationQuery
in interfaceQueryProducerImplementor
-
createNativeMutationQuery
Description copied from interface:QueryProducer
Create aNativeQuery
instance for the given native SQL statement.- Specified by:
createNativeMutationQuery
in interfaceQueryProducer
- Specified by:
createNativeMutationQuery
in interfaceQueryProducerImplementor
- Parameters:
sqlString
- a native SQL statement string- Returns:
- The NativeQuery instance for manipulation and execution
-
createNamedStoredProcedureQuery
Description copied from interface:SharedSessionContract
Obtain aProcedureCall
based on a named template- Specified by:
createNamedStoredProcedureQuery
in interfaceSharedSessionContract
- Parameters:
name
- The name given to the template- Returns:
- The ProcedureCall
- See Also:
-
createStoredProcedureQuery
Description copied from interface:SharedSessionContract
Create aProcedureCall
to a stored procedure.- Specified by:
createStoredProcedureQuery
in interfaceSharedSessionContract
- Parameters:
procedureName
- The name of the procedure.- Returns:
- The representation of the procedure call.
-
createStoredProcedureQuery
Description copied from interface:SharedSessionContract
Create aProcedureCall
to a stored procedure with the given result set entity mappings. Each given class is considered a "root return".- Specified by:
createStoredProcedureQuery
in interfaceSharedSessionContract
- Parameters:
procedureName
- The name of the procedure.resultClasses
- The entity(s) to map the result on to.- Returns:
- The representation of the procedure call.
-
createStoredProcedureQuery
Description copied from interface:SharedSessionContract
Create aProcedureCall
to a stored procedure with the given result set entity mappings.- Specified by:
createStoredProcedureQuery
in interfaceSharedSessionContract
- Parameters:
procedureName
- The name of the procedure.resultSetMappings
- The explicit result set mapping(s) to use for mapping the results- Returns:
- The representation of the procedure call.
-
getNamedProcedureCall
Description copied from interface:SharedSessionContract
Obtain aProcedureCall
based on a named template- Specified by:
getNamedProcedureCall
in interfaceSharedSessionContract
- Parameters:
name
- The name given to the template- Returns:
- The ProcedureCall
- See Also:
-
createStoredProcedureCall
Description copied from interface:SharedSessionContract
Create aProcedureCall
to a stored procedure.- Specified by:
createStoredProcedureCall
in interfaceSharedSessionContract
- Parameters:
procedureName
- The name of the procedure.- Returns:
- The representation of the procedure call.
-
createStoredProcedureCall
Description copied from interface:SharedSessionContract
Create aProcedureCall
to a stored procedure with the given result set entity mappings. Each given class is considered a "root return".- Specified by:
createStoredProcedureCall
in interfaceSharedSessionContract
- Parameters:
procedureName
- The name of the procedure.resultClasses
- The entity(s) to map the result on to.- Returns:
- The representation of the procedure call.
-
createStoredProcedureCall
Description copied from interface:SharedSessionContract
Create aProcedureCall
to a stored procedure with the given result set entity mappings.- Specified by:
createStoredProcedureCall
in interfaceSharedSessionContract
- Parameters:
procedureName
- The name of the procedure.resultSetMappings
- The explicit result set mapping(s) to use for mapping the results- Returns:
- The representation of the procedure call.
-
doWork
Description copied from interface:SharedSessionContract
Perform work using theConnection
underlying by this session.- Specified by:
doWork
in interfaceSharedSessionContract
- Parameters:
work
- The work to be performed.- Throws:
HibernateException
- Generally indicates wrappedSQLException
-
doReturningWork
Description copied from interface:SharedSessionContract
Perform work using theConnection
underlying by this session, and return a result.- Specified by:
doReturningWork
in interfaceSharedSessionContract
- Type Parameters:
T
- The type of the result returned from the work- Parameters:
work
- The work to be performed.- Returns:
- the result of calling
ReturningWork.execute(java.sql.Connection)
. - Throws:
HibernateException
- Generally indicates wrappedSQLException
-
close
Description copied from interface:SharedSessionContract
End the session by releasing the JDBC connection and cleaning up.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceSharedSessionContract
- Throws:
HibernateException
- Indicates problems cleaning up.
-
isOpen
public boolean isOpen()Description copied from interface:SharedSessionContract
Check if the session is still open.- Specified by:
isOpen
in interfaceSharedSessionContract
- Returns:
- boolean
-
isConnected
public boolean isConnected()Description copied from interface:SharedSessionContract
Check if the session is currently connected.- Specified by:
isConnected
in interfaceSharedSessionContract
- Returns:
- boolean
-
beginTransaction
Description copied from interface:SharedSessionContract
Begin a unit of work and return the associatedTransaction
object. If a new underlying transaction is required, begin the transaction. Otherwise, continue the new work in the context of the existing underlying transaction.- Specified by:
beginTransaction
in interfaceSharedSessionContract
- Returns:
- a
Transaction
instance - See Also:
-
getTransaction
Description copied from interface:SharedSessionContract
Get theTransaction
instance associated with this session.- Specified by:
getTransaction
in interfaceSharedSessionContract
- Returns:
- a Transaction instance
- See Also:
-
joinTransaction
public void joinTransaction()Description copied from interface:SharedSessionContract
Join the currently-active JTA transaction.- Specified by:
joinTransaction
in interfaceSharedSessionContract
- See Also:
-
isJoinedToTransaction
public boolean isJoinedToTransaction()Description copied from interface:SharedSessionContract
Check if the session is joined to the current transaction.- Specified by:
isJoinedToTransaction
in interfaceSharedSessionContract
- See Also:
-
getCriteriaBuilder
Description copied from interface:SharedSessionContract
- Specified by:
getCriteriaBuilder
in interfaceSharedSessionContract
- Returns:
- an instance of
HibernateCriteriaBuilder
- See Also:
-
getJdbcBatchSize
Description copied from interface:SharedSessionContract
Get the session-level JDBC batch size for the current session.- Specified by:
getJdbcBatchSize
in interfaceJdbcSessionOwner
- Specified by:
getJdbcBatchSize
in interfaceSharedSessionContract
- Returns:
- the current session-level JDBC batch size
- See Also:
-
getEventManager
- Specified by:
getEventManager
in interfaceJdbcSessionOwner
-
setJdbcBatchSize
Description copied from interface:SharedSessionContract
Set the session-level JDBC batch size. Override the factory-level JDBC batch size controlled by the configuration property "hibernate.jdbc.batch_size".- Specified by:
setJdbcBatchSize
in interfaceSharedSessionContract
- Parameters:
jdbcBatchSize
- the new session-level JDBC batch size- See Also:
-
execute
Description copied from interface:LobCreationContext
Execute the given callback, making sure it has access to a viable JDBCConnection
.- Specified by:
execute
in interfaceLobCreationContext
- Type Parameters:
T
- The Java type of the type of LOB being created. One ofBlob
,Clob
,NClob
- Parameters:
callback
- The callback to execute .- Returns:
- The LOB created by the callback.
-
getFactory
Description copied from interface:SharedSessionContractImplementor
Obtain the factory which created this session.- Specified by:
getFactory
in interfaceQueryProducerImplementor
- Specified by:
getFactory
in interfaceSharedSessionContract
- Specified by:
getFactory
in interfaceSharedSessionContractImplementor
-
getEventListenerManager
Description copied from interface:SharedSessionContractImplementor
Get theSessionEventListenerManager
associated with this session.- Specified by:
getEventListenerManager
in interfaceSharedSessionContractImplementor
-
getPersistenceContext
Description copied from interface:SharedSessionContractImplementor
Get the persistence context for this session.See
SharedSessionContractImplementor.getPersistenceContextInternal()
for a faster alternative.- Specified by:
getPersistenceContext
in interfaceSharedSessionContractImplementor
-
getJdbcCoordinator
Description copied from interface:SharedSessionContractImplementor
Obtain theJdbcCoordinator
for this session.- Specified by:
getJdbcCoordinator
in interfaceSharedSessionContractImplementor
-
getJdbcServices
Description copied from interface:SharedSessionContractImplementor
Obtain theJdbcServices
for the factory which created this session.- Specified by:
getJdbcServices
in interfaceSharedSessionContractImplementor
-
getSessionIdentifier
Description copied from interface:SharedSessionContractImplementor
Obtain aUUID
which uniquely identifies this session.The UUID is useful mainly for logging.
- Specified by:
getSessionIdentifier
in interfaceSharedSessionContractImplementor
-
isClosed
public boolean isClosed()Description copied from interface:SharedSessionContractImplementor
Determines whether the session is closed.- Specified by:
isClosed
in interfaceSharedSessionContractImplementor
- Returns:
true
if the session is closed;false
otherwise.
-
checkOpen
public void checkOpen(boolean markForRollbackIfClosed) Description copied from interface:SharedSessionContractImplementor
Check whether the session is open, and if not:- if
markForRollbackIfClosed = true
, mark the current transaction, if any, for rollback only, and - throw an
IllegalStateException
. (JPA specifies this exception type.)
- Specified by:
checkOpen
in interfaceSharedSessionContractImplementor
- if
-
prepareForQueryExecution
public void prepareForQueryExecution(boolean requiresTxn) Description copied from interface:SharedSessionContractImplementor
Prepare for the execution of aQuery
orProcedureCall
- Specified by:
prepareForQueryExecution
in interfaceSharedSessionContractImplementor
-
markForRollbackOnly
public void markForRollbackOnly()Description copied from interface:SharedSessionContractImplementor
Marks current transaction, if any, for rollback only.- Specified by:
markForRollbackOnly
in interfaceSharedSessionContractImplementor
-
getCacheTransactionSynchronization
Description copied from interface:SharedSessionContractImplementor
The currentCacheTransactionSynchronization
associated with this session. This may benull
if the session is not currently associated with an active transaction.- Specified by:
getCacheTransactionSynchronization
in interfaceSharedSessionContractImplementor
-
isTransactionInProgress
public boolean isTransactionInProgress()Description copied from interface:SharedSessionContractImplementor
Does this session have an active Hibernate transaction, or is it associated with a JTA transaction currently in progress?- Specified by:
isTransactionInProgress
in interfaceSharedSessionContractImplementor
-
accessTransaction
Description copied from interface:SharedSessionContractImplementor
Retrieves the currentTransaction
, or creates a new transaction if there is no transaction active.This method is primarily for internal or integrator use.
- Specified by:
accessTransaction
in interfaceSharedSessionContractImplementor
- Returns:
- the
Transaction
-
generateEntityKey
Description copied from interface:SharedSessionContractImplementor
Instantiate anEntityKey
with the given id and for the entity represented by the givenEntityPersister
.- Specified by:
generateEntityKey
in interfaceSharedSessionContractImplementor
- Parameters:
id
- The entity idpersister
- The entity persister- Returns:
- The entity key
-
getInterceptor
Description copied from interface:SharedSessionContractImplementor
Retrieves theInterceptor
associated with this session.- Specified by:
getInterceptor
in interfaceSharedSessionContractImplementor
-
setAutoClear
public void setAutoClear(boolean enabled) Description copied from interface:SharedSessionContractImplementor
Enable or disable automatic cache clearing from after transaction completion.- Specified by:
setAutoClear
in interfaceSharedSessionContractImplementor
-
initializeCollection
public void initializeCollection(PersistentCollection<?> collection, boolean writing) throws HibernateException Description copied from interface:SharedSessionContractImplementor
Initialize the given collection (if not already initialized).- Specified by:
initializeCollection
in interfaceSharedSessionContractImplementor
- Throws:
HibernateException
-
internalLoad
public Object internalLoad(String entityName, Object id, boolean eager, boolean nullable) throws HibernateException Description copied from interface:SharedSessionContractImplementor
Obtain an entity instance with the given id, without checking if it was deleted or scheduled for deletion.- When
nullable = false
, this method may create a new proxy or return an existing proxy; if it does not exist, an exception is thrown. - When
nullable = true
, the method does not create new proxies, though it might return an existing proxy; if it does not exist, anull
value is returned.
When
eager = true
, the object is eagerly fetched from the database.- Specified by:
internalLoad
in interfaceSharedSessionContractImplementor
- Throws:
HibernateException
- When
-
immediateLoad
Description copied from interface:SharedSessionContractImplementor
Load an instance immediately. This method is only called when lazily initializing a proxy. Do not return the proxy.- Specified by:
immediateLoad
in interfaceSharedSessionContractImplementor
- Throws:
HibernateException
-
getEntityPersister
public EntityPersister getEntityPersister(@Nullable String entityName, Object object) throws HibernateException Description copied from interface:SharedSessionContractImplementor
Get theEntityPersister
for the given entity instance.- Specified by:
getEntityPersister
in interfaceSharedSessionContractImplementor
- Parameters:
entityName
- optional entity nameobject
- the entity instance- Throws:
HibernateException
-
getEntityUsingInterceptor
Description copied from interface:SharedSessionContractImplementor
Get the entity instance associated with the givenEntityKey
, calling theInterceptor
if necessary.- Specified by:
getEntityUsingInterceptor
in interfaceSharedSessionContractImplementor
- Throws:
HibernateException
-
getContextEntityIdentifier
Description copied from interface:SharedSessionContractImplementor
Return the identifier of the persistent object, or null if it is not associated with this session.- Specified by:
getContextEntityIdentifier
in interfaceSharedSessionContractImplementor
-
bestGuessEntityName
Description copied from interface:SharedSessionContractImplementor
Obtain the best estimate of the entity name of the given entity instance, which is not involved in an association, by also considering information held in the proxy, and whether the object is already associated with this session.- Specified by:
bestGuessEntityName
in interfaceSharedSessionContractImplementor
-
guessEntityName
Description copied from interface:SharedSessionContractImplementor
Obtain an estimate of the entity name of the given entity instance, which is not involved in an association, using only theEntityNameResolver
.- Specified by:
guessEntityName
in interfaceSharedSessionContractImplementor
- Throws:
HibernateException
-
instantiate
Description copied from interface:SharedSessionContractImplementor
Instantiate the entity class, initializing with the given identifier.- Specified by:
instantiate
in interfaceSharedSessionContractImplementor
- Throws:
HibernateException
-
instantiate
Description copied from interface:SharedSessionContractImplementor
Instantiate the entity class of the givenEntityPersister
, initializing the new instance with the given identifier.This is more efficient than
SharedSessionContractImplementor.instantiate(String, Object)
, but not always interchangeable, since a single persister might be responsible for multiple types.- Specified by:
instantiate
in interfaceSharedSessionContractImplementor
- Throws:
HibernateException
-
isDefaultReadOnly
public boolean isDefaultReadOnly()Description copied from interface:SharedSessionContractImplementor
Are entities and proxies loaded by this session read-only by default?- Specified by:
isDefaultReadOnly
in interfaceSharedSessionContractImplementor
-
getCacheMode
Description copied from interface:SharedSessionContractImplementor
Get the currentCacheMode
for this session.- Specified by:
getCacheMode
in interfaceQueryProducerImplementor
- Specified by:
getCacheMode
in interfaceSharedSessionContractImplementor
-
setCacheMode
Description copied from interface:SharedSessionContractImplementor
Set the currentCacheMode
for this session.- Specified by:
setCacheMode
in interfaceSharedSessionContractImplementor
-
setCriteriaCopyTreeEnabled
public void setCriteriaCopyTreeEnabled(boolean jpaCriteriaCopyComplianceEnabled) - Specified by:
setCriteriaCopyTreeEnabled
in interfaceSharedSessionContractImplementor
-
isCriteriaCopyTreeEnabled
public boolean isCriteriaCopyTreeEnabled()- Specified by:
isCriteriaCopyTreeEnabled
in interfaceSharedSessionContractImplementor
-
getNativeJdbcParametersIgnored
public boolean getNativeJdbcParametersIgnored()- Specified by:
getNativeJdbcParametersIgnored
in interfaceSharedSessionContractImplementor
-
setNativeJdbcParametersIgnored
public void setNativeJdbcParametersIgnored(boolean nativeJdbcParametersIgnored) - Specified by:
setNativeJdbcParametersIgnored
in interfaceSharedSessionContractImplementor
-
getFlushMode
Description copied from interface:SharedSessionContractImplementor
Get the currentFlushModeType
for this session.For users of the Hibernate native APIs, we've had to rename this method as defined by Hibernate historically because the JPA contract defines a method of the same name, but returning the JPA
FlushModeType
rather than Hibernate'sFlushMode
. For the former behavior, useSharedSessionContractImplementor.getHibernateFlushMode()
instead.- Specified by:
getFlushMode
in interfaceSharedSessionContractImplementor
- Returns:
- The
FlushModeType
in effect for this Session.
-
setHibernateFlushMode
Description copied from interface:SharedSessionContractImplementor
Set the currentFlushMode
for this session.The flush mode determines the points at which the session is flushed. Flushing is the process of synchronizing the underlying persistent store with persistable state held in memory.
For a logically "read-only" session, it's reasonable to set the session flush mode to
FlushMode.MANUAL
at the start of the session (in order skip some work and gain some extra performance).- Specified by:
setHibernateFlushMode
in interfaceSharedSessionContractImplementor
- Parameters:
flushMode
- the new flush mode
-
getHibernateFlushMode
Description copied from interface:SharedSessionContractImplementor
Get the currentFlushMode
for this session.- Specified by:
getHibernateFlushMode
in interfaceQueryProducerImplementor
- Specified by:
getHibernateFlushMode
in interfaceSharedSessionContractImplementor
- Returns:
- The flush mode
-
flush
public void flush()Description copied from interface:SharedSessionContractImplementor
Flush this session.- Specified by:
flush
in interfaceSharedSessionContractImplementor
-
afterScrollOperation
public void afterScrollOperation()Description copied from interface:SharedSessionContractImplementor
Called after each operation on aScrollableResults
, providing an opportunity for a stateless session to clear its temporary persistence context. For a stateful session, this method does nothing.- Specified by:
afterScrollOperation
in interfaceSharedSessionContractImplementor
-
shouldAutoClose
public boolean shouldAutoClose()Description copied from interface:SharedSessionContractImplementor
Should this session be automatically closed after the current transaction completes?- Specified by:
shouldAutoClose
in interfaceSharedSessionContractImplementor
-
isAutoCloseSessionEnabled
public boolean isAutoCloseSessionEnabled()Description copied from interface:SharedSessionContractImplementor
Is auto-close at transaction completion enabled?- Specified by:
isAutoCloseSessionEnabled
in interfaceSharedSessionContractImplementor
- See Also:
-
getLoadQueryInfluencers
Description copied from interface:SharedSessionContractImplementor
Get theLoadQueryInfluencers
associated with this session.- Specified by:
getLoadQueryInfluencers
in interfaceSharedSessionContractImplementor
- Returns:
- the
LoadQueryInfluencers
associated with this session; should never be null.
-
getExceptionConverter
Description copied from interface:SharedSessionContractImplementor
Obtain anExceptionConverter
for reporting an error.The converter associated to a session might be lazily initialized, so only invoke this getter when there's an actual need to use it.
- Specified by:
getExceptionConverter
in interfaceSharedSessionContractImplementor
- Returns:
- the ExceptionConverter for this Session.
-
getPersistenceContextInternal
Description copied from interface:SharedSessionContractImplementor
Similar toSharedSessionContractImplementor.getPersistenceContext()
, with two differences:- this version performs better as it allows for inlining and probably better prediction, and
- it skips some checks of the current state of the session.
- Specified by:
getPersistenceContextInternal
in interfaceSharedSessionContractImplementor
- Returns:
- the
PersistenceContext
associated to this session.
-
autoFlushIfRequired
Description copied from interface:SharedSessionContractImplementor
detect in-memory changes, determine if the changes are to tables named in the query and, if so, complete execution the flush- Specified by:
autoFlushIfRequired
in interfaceSharedSessionContractImplementor
- Parameters:
querySpaces
- the tables named in the query.- Returns:
- true if flush is required, false otherwise.
- Throws:
HibernateException
-
autoFlushIfRequired
public boolean autoFlushIfRequired(Set<String> querySpaces, boolean skipPreFlush) throws HibernateException - Specified by:
autoFlushIfRequired
in interfaceSharedSessionContractImplementor
- Throws:
HibernateException
-
autoPreFlush
public void autoPreFlush()- Specified by:
autoPreFlush
in interfaceSharedSessionContractImplementor
-
afterOperation
public void afterOperation(boolean success) Description copied from interface:SharedSessionContractImplementor
Check if there is a Hibernate or JTA transaction in progress and, if there is not, flush if necessary, making sure that the connection has been committed (if it is not in autocommit mode), and finally run the after completion processing.- Specified by:
afterOperation
in interfaceSharedSessionContractImplementor
- Parameters:
success
-true
if the operation a success
-
getJdbcSessionContext
- Specified by:
getJdbcSessionContext
in interfaceJdbcSessionOwner
-
getJdbcConnectionAccess
- Specified by:
getJdbcConnectionAccess
in interfaceJdbcSessionOwner
-
getTransactionCoordinator
Description copied from interface:JdbcSessionOwner
Obtain the builder for TransactionCoordinator instances- Specified by:
getTransactionCoordinator
in interfaceJdbcSessionOwner
- Returns:
- The TransactionCoordinatorBuilder
-
startTransactionBoundary
public void startTransactionBoundary()Description copied from interface:JdbcSessionOwner
Callback indicating recognition of entering into a transactional context whether that is explicitly via the HibernateTransaction
API or via registration of Hibernate's JTA Synchronization impl with a JTA Transaction- Specified by:
startTransactionBoundary
in interfaceJdbcSessionOwner
-
afterTransactionBegin
public void afterTransactionBegin()Description copied from interface:JdbcSessionOwner
A after-begin callback from the coordinator to its owner.- Specified by:
afterTransactionBegin
in interfaceJdbcSessionOwner
-
beforeTransactionCompletion
public void beforeTransactionCompletion()Description copied from interface:JdbcSessionOwner
A before-completion callback to the owner.- Specified by:
beforeTransactionCompletion
in interfaceJdbcSessionOwner
-
afterTransactionCompletion
public void afterTransactionCompletion(boolean successful, boolean delayed) Description copied from interface:JdbcSessionOwner
An after-completion callback to the owner.- Specified by:
afterTransactionCompletion
in interfaceJdbcSessionOwner
- Parameters:
successful
- Was the transaction successful?delayed
- Is this a delayed after transaction completion call (aka after a timeout)?
-
flushBeforeTransactionCompletion
public void flushBeforeTransactionCompletion()- Specified by:
flushBeforeTransactionCompletion
in interfaceJdbcSessionOwner
-
shouldAutoJoinTransaction
public boolean shouldAutoJoinTransaction()Description copied from interface:TransactionCoordinatorBuilder.Options
Indicates whether an active transaction should be automatically joined. Only relevant for JTA-based TransactionCoordinator instances.- Specified by:
shouldAutoJoinTransaction
in interfaceTransactionCoordinatorBuilder.Options
- Returns:
true
indicates the active transaction should be auto joined;false
indicates it should not (untilTransactionCoordinator.explicitJoin()
is called).
-
useStreamForLobBinding
public boolean useStreamForLobBinding()Description copied from interface:WrapperOptions
Determines whether streams should be used for binding LOB values.- Specified by:
useStreamForLobBinding
in interfaceWrapperOptions
- Returns:
true
/false
- See Also:
-
getPreferredSqlTypeCodeForBoolean
public int getPreferredSqlTypeCodeForBoolean()Description copied from interface:WrapperOptions
The JDBCtype code
used to bind a null boolean value.- Specified by:
getPreferredSqlTypeCodeForBoolean
in interfaceWrapperOptions
- See Also:
-
getLobCreator
Description copied from interface:WrapperOptions
Obtain access to theLobCreator
.- Specified by:
getLobCreator
in interfaceWrapperOptions
- Returns:
- The LOB creator
- See Also:
-
getJdbcTimeZone
Description copied from interface:WrapperOptions
The JDBCTimeZone
used when writing a value of typeTime
orTimestamp
to a JDBCPreparedStatement
, or when reading from a JDBCResultSet
.- When
getJdbcTimeZone()
is null, the methodPreparedStatement.setTimestamp(int, java.sql.Timestamp)
is called to write a timestamp, andResultSet.getTimestamp(int)
is called to read a timestamp. - But when not null, the method
PreparedStatement.setTimestamp(int, java.sql.Timestamp, java.util.Calendar)
is called to write a timestamp, andResultSet.getTimestamp(int, java.util.Calendar)
is called to read a timestamp.
Thus, the storage
TimeZone
can differ from the default JVM TimeZone given byTimeZone.getDefault()
.- Specified by:
getJdbcTimeZone
in interfaceWrapperOptions
- Returns:
- the JDBC
TimeZone
, or null if no JDBC timezone was explicitly set - See Also:
- When
-
createEntityGraph
Description copied from interface:SharedSessionContract
Create a new mutableEntityGraph
with only a root node.- Specified by:
createEntityGraph
in interfaceSharedSessionContract
- Parameters:
rootType
- the root entity class of the graph
-
createEntityGraph
Description copied from interface:SharedSessionContract
Create a new mutable copy of the namedEntityGraph
, or returnnull
if there is no graph with the given name.- Specified by:
createEntityGraph
in interfaceSharedSessionContract
- Parameters:
graphName
- the name of the graph- See Also:
-
createEntityGraph
Description copied from interface:SharedSessionContract
Create a new mutable copy of the namedEntityGraph
, or returnnull
if there is no graph with the given name.- Specified by:
createEntityGraph
in interfaceSharedSessionContract
- Parameters:
rootType
- the root entity class of the graphgraphName
- the name of the graph- See Also:
-
getEntityGraph
Description copied from interface:SharedSessionContract
Retrieve the namedEntityGraph
as an immutable graph, or returnnull
if there is no graph with the given name.- Specified by:
getEntityGraph
in interfaceSharedSessionContract
- Parameters:
graphName
- the name of the graph- See Also:
-
getEntityGraphs
Description copied from interface:SharedSessionContract
Retrieve all namedEntityGraph
s with the given type.- Specified by:
getEntityGraphs
in interfaceSharedSessionContract
- See Also:
-
enableFilter
Description copied from interface:SharedSessionContract
Enable the named filter for this current session.The returned
Filter
object must be used to bind arguments to parameters of the filter, and every parameter must be set before any other operation of this session is called.- Specified by:
enableFilter
in interfaceSharedSessionContract
- Parameters:
filterName
- the name of the filter to be enabled.- Returns:
- the
Filter
instance representing the enabled filter. - See Also:
-
getEnabledFilter
Description copied from interface:SharedSessionContract
Retrieve a currently enabled filter by name.- Specified by:
getEnabledFilter
in interfaceSharedSessionContract
- Parameters:
filterName
- the name of the filter to be retrieved.- Returns:
- the
Filter
instance representing the enabled filter.
-
disableFilter
Description copied from interface:SharedSessionContract
Disable the named filter for the current session.- Specified by:
disableFilter
in interfaceSharedSessionContract
- Parameters:
filterName
- the name of the filter to be disabled.
-