Top Description Methods
org.hibernate.engine.spi

public Interface SharedSessionContractImplementor

extends SharedSessionContract, JdbcSessionOwner, Options, LobCreationContext, WrapperOptions, QueryProducerImplementor, CoercionContext
Known Direct Subinterfaces
org.hibernate.engine.spi.SessionImplementor
Known Direct Implementers
org.hibernate.engine.spi.SharedSessionDelegatorBaseImpl, org.hibernate.internal.AbstractSharedSessionContract, org.hibernate.internal.SessionImpl
Imports
java.util.Set, .UUID, jakarta.persistence.FlushModeType, .TransactionRequiredException, org.checkerframework.checker.nullness.qual.Nullable, org.hibernate.CacheMode, .FlushMode, .HibernateException, .Interceptor, .StatelessSession, .SharedSessionContract, .Transaction, org.hibernate.boot.spi.SessionFactoryOptions, org.hibernate.event.spi.EventSource, org.hibernate.graph.GraphSemantic, org.hibernate.query.Query, org.hibernate.cache.spi.CacheTransactionSynchronization, org.hibernate.collection.spi.PersistentCollection, org.hibernate.engine.jdbc.LobCreationContext, org.hibernate.engine.jdbc.spi.JdbcCoordinator, .JdbcServices, org.hibernate.persister.entity.EntityPersister, org.hibernate.query.spi.QueryProducerImplementor, org.hibernate.resource.jdbc.spi.JdbcSessionOwner, org.hibernate.resource.transaction.spi.TransactionCoordinator, .TransactionCoordinatorBuilder.Options, org.hibernate.type.descriptor.WrapperOptions, org.hibernate.type.descriptor.java.JavaType, org.hibernate.type.spi.TypeConfiguration

Defines the internal contract shared between org.hibernate.Session and org.hibernate.StatelessSession as used by other parts of Hibernate, including implementors of org.hibernate.type.Type, EntityPersister, and org.hibernate.persister.collection.CollectionPersister.

The Session, via this interface and SharedSessionContractImplementor, implements:

Authors
Gavin King, Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public Transaction

Returns:

the Transaction
accessTransaction
()

Retrieves the current Transaction, or creates a new transaction if there is no transaction active.

public void
afterOperation(boolean
true if the operation a success
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.

public void
afterScrollOperation()

Called after each operation on a org.hibernate.ScrollableResults, providing an opportunity for a stateless session to clear its temporary persistence context.

public default EventSource
asEventSource()

Cast this session to EventSource if possible.

public default SessionImplementor
asSessionImplementor()

Cast this object to SessionImplementor, if possible.

public default StatelessSession
asStatelessSession()

Cast this object to StatelessSession, if possible.

public boolean

Returns:

true if flush is required, false otherwise.
autoFlushIfRequired
(Set<String>
the tables named in the query.
querySpaces
)

detect in-memory changes, determine if the changes are to tables named in the query and, if so, complete execution the flush

public String
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.

public default String
bestGuessEntityName(Object object, EntityEntry entry)

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.

public default void
checkOpen()

Check whether the session is open, and if not:

  • mark the current transaction, if any, for rollback only, and
  • throw an IllegalStateException. (JPA specifies this exception type.)
public void
checkOpen(boolean markForRollbackIfClosed)

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.)
public default void
checkTransactionNeededForUpdateOperation(String
the message to use for the TransactionRequiredException
exceptionMessage
)

Check if an active Transaction is available before performing an update operation against the database.

public void
flush()

Flush this session.

public EntityKey

Returns:

The entity key
generateEntityKey
(Object
The entity id
id
,
EntityPersister
The entity persister
persister
)

Instantiate an EntityKey with the given id and for the entity represented by the given EntityPersister.

public CacheMode
public CacheTransactionSynchronization
getCacheTransactionSynchronization()

The current CacheTransactionSynchronization associated with this session.

public default Integer

Returns:

the session-level JDBC batch size is set, or the factory-level setting otherwise
getConfiguredJdbcBatchSize
()

Get the currently configured JDBC batch size, which might have been specified at either the session or factory level.

public Object
getContextEntityIdentifier(Object object)

Return the identifier of the persistent object, or null if it is not associated with this session.

public EntityPersister
getEntityPersister(@Nullable String
optional entity name
entityName
,
Object
the entity instance
object
)

Get the EntityPersister for the given entity instance.

public Object
getEntityUsingInterceptor(EntityKey key)

Get the entity instance associated with the given EntityKey, calling the Interceptor if necessary.

public SessionEventListenerManager
getEventListenerManager()

Get the SessionEventListenerManager associated with this session.

public ExceptionConverter

Returns:

the ExceptionConverter for this Session.
getExceptionConverter
()

Obtain an ExceptionConverter for reporting an error.

public SessionFactoryImplementor
getFactory()

Redeclares org.hibernate.SharedSessionContract.getFactory, org.hibernate.query.spi.QueryProducerImplementor.getFactory.

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
Obtain the factory which created this session.
public FlushModeType

Returns:

The FlushModeType in effect for this Session.
getFlushMode
()

Deprecated since 6. there's no good reason to expose this here
Get the current FlushModeType for this session.
public FlushMode

Returns:

The flush mode
getHibernateFlushMode
()

Redeclares org.hibernate.query.spi.QueryProducerImplementor.getHibernateFlushMode.

Get the current FlushMode for this session.
public Interceptor
getInterceptor()

Retrieves the Interceptor associated with this session.

public JdbcCoordinator
getJdbcCoordinator()

Obtain the JdbcCoordinator for this session.

public JdbcServices
getJdbcServices()

Obtain the JdbcServices for the factory which created this session.

public LoadQueryInfluencers

Returns:

the LoadQueryInfluencers associated with this session; should never be null.
getLoadQueryInfluencers
()

Get the LoadQueryInfluencers associated with this session.

public boolean
public PersistenceContext
getPersistenceContext()

Get the persistence context for this session.

public PersistenceContext

Returns:

the PersistenceContext associated to this session.
getPersistenceContextInternal
()

Similar to getPersistenceContext(), with two differences:

  1. this version performs better as it allows for inlining and probably better prediction, and
  2. it skips some checks of the current state of the session.
public default SharedSessionContractImplementor
getSession()

Implements org.hibernate.type.descriptor.WrapperOptions.getSession.

Returns this object, fulfilling the contract of WrapperOptions.
public default SessionFactoryImplementor
getSessionFactory()

Implements org.hibernate.type.descriptor.WrapperOptions.getSessionFactory.

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
Obtain the factory which created this session.
public UUID
getSessionIdentifier()

Obtain a UUID which uniquely identifies this session.

public default Object
getSessionToken()

Obtain a "token" which uniquely identifies this session.

public default TypeConfiguration
public String
guessEntityName(Object entity)

Obtain an estimate of the entity name of the given entity instance, which is not involved in an association, using only the org.hibernate.EntityNameResolver.

public Object
immediateLoad(String entityName, Object id)

Load an instance immediately.

public void
initializeCollection(PersistentCollection<?> collection, boolean writing)

Initialize the given collection (if not already initialized).

public Object
instantiate(String entityName, Object id)

Instantiate the entity class, initializing with the given identifier.

public Object
instantiate(EntityPersister persister, Object id)

Instantiate the entity class of the given EntityPersister, initializing the new instance with the given identifier.

public Object
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.

public boolean
isAutoCloseSessionEnabled()

Deprecated since 6. there's no reason to expose this here
Is auto-close at transaction completion enabled?
public boolean

Returns:

true if the session is closed; false otherwise.
isClosed
()

Determines whether the session is closed.

public boolean
public boolean
isDefaultReadOnly()

Are entities and proxies loaded by this session read-only by default?

public default boolean
isEnforcingFetchGraph()

Deprecated for removal since 6. this is not used anywhere
Are we currently enforcing a fetch graph?
public default boolean
isEventSource()

Determines if this session implements EventSource.

public default boolean

Returns:

true if the session is closed, or if it's waiting for auto-close; false otherwise.
isOpenOrWaitingForAutoClose
()

Determines whether the session is open or is waiting for auto-close.

public default boolean
isSessionImplementor()

Does this object implement SessionImplementor?

public default boolean
isStatelessSession()

Does this object implement StatelessSession?

public boolean
isTransactionInProgress()

Does this session have an active Hibernate transaction, or is it associated with a JTA transaction currently in progress?

public void
markForRollbackOnly()

Marks current transaction, if any, for rollback only.

public void
prepareForQueryExecution(boolean requiresTxn)

Prepare for the execution of a Query or org.hibernate.procedure.ProcedureCall

public void
setAutoClear(boolean enabled)

Deprecated since 6. there's no good reason to expose this here
Enable or disable automatic cache clearing from after transaction completion.
public void
setCacheMode(CacheMode cm)

Set the current CacheMode for this session.

public void
setCriteriaCopyTreeEnabled(boolean jpaCriteriaCopyComplianceEnabled)

public default void
setEnforcingFetchGraph(boolean enforcingFetchGraph)

Deprecated for removal since 6. this is not used anywhere
Enable or disable fetch graph enforcement.
public void
setHibernateFlushMode(FlushMode
the new flush mode
flushMode
)

Set the current FlushMode for this session.

public void
setNativeJdbcParametersIgnored(boolean nativeJdbcParametersIgnored)

public boolean
shouldAutoClose()

Deprecated since 6. there's no reason to expose this here
Should this session be automatically closed after the current transaction completes?
Inherited from org.hibernate.engine.jdbc.LobCreationContext:
executefromContext
Inherited from org.hibernate.query.spi.QueryProducerImplementor:
createMutationQuerycreateMutationQuerycreateMutationQuerycreateNamedMutationQuerycreateNamedQuerycreateNamedQuerycreateNativeMutationQuerycreateNativeQuerycreateNativeQuerycreateNativeQuerycreateNativeQuerycreateNativeQuerycreateQuerycreateQuerycreateQuerycreateQuerycreateQuerygetNamedNativeQuerygetNamedNativeQuerygetNamedQuery
Inherited from org.hibernate.resource.jdbc.spi.JdbcSessionOwner:
afterTransactionBeginafterTransactionCompletionbeforeTransactionCompletionflushBeforeTransactionCompletiongetEventManagergetJdbcBatchSizegetJdbcConnectionAccessgetJdbcSessionContextgetTransactionCoordinatorstartTransactionBoundary
Inherited from org.hibernate.resource.transaction.spi.TransactionCoordinatorBuilder.Options:
shouldAutoJoinTransaction
Inherited from org.hibernate.SharedSessionContract:
beginTransactionclosecreateEntityGraphcreateEntityGraphcreateEntityGraphcreateNamedStoredProcedureQuerycreateStoredProcedureCallcreateStoredProcedureCallcreateStoredProcedureCallcreateStoredProcedureQuerycreateStoredProcedureQuerycreateStoredProcedureQuerydoReturningWorkdoWorkgetCriteriaBuildergetEntityGraphgetEntityGraphsgetJdbcBatchSizegetNamedProcedureCallgetTenantIdentifiergetTenantIdentifierValuegetTransactionisConnectedisJoinedToTransactionisOpenjoinTransactionsetJdbcBatchSize
Inherited from org.hibernate.type.descriptor.WrapperOptions:
getJdbcTimeZonegetLobCreatorgetPreferredSqlTypeCodeForBooleanuseStreamForLobBinding

Method Detail

accessTransactionback to summary
public Transaction accessTransaction()

Retrieves the current Transaction, or creates a new transaction if there is no transaction active.

This method is primarily for internal or integrator use.

Returns:Transaction

the Transaction

afterOperationback to summary
public 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.

Parameters
success:boolean

true if the operation a success

afterScrollOperationback to summary
public void afterScrollOperation()

Called after each operation on a org.hibernate.ScrollableResults, providing an opportunity for a stateless session to clear its temporary persistence context. For a stateful session, this method does nothing.

asEventSourceback to summary
public default EventSource asEventSource()

Cast this session to EventSource if possible.

Only stateful session are sources of events. If this object is a stateless session, this method throws.

Exceptions
ClassCastException:
if the cast is not possible
asSessionImplementorback to summary
public default SessionImplementor asSessionImplementor()

Cast this object to SessionImplementor, if possible.

Exceptions
ClassCastException:
if the cast is not possible
asStatelessSessionback to summary
public default StatelessSession asStatelessSession()

Cast this object to StatelessSession, if possible.

Exceptions
ClassCastException:
if the cast is not possible
autoFlushIfRequiredback to summary
public boolean autoFlushIfRequired(Set<String> querySpaces) throws HibernateException

detect in-memory changes, determine if the changes are to tables named in the query and, if so, complete execution the flush

Parameters
querySpaces:Set<String>

the tables named in the query.

Returns:boolean

true if flush is required, false otherwise.

bestGuessEntityNameback to summary
public String 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.

bestGuessEntityNameback to summary
public default String bestGuessEntityName(Object object, EntityEntry entry)

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.

checkOpenback to summary
public default void checkOpen()

Check whether the session is open, and if not:

  • mark the current transaction, if any, for rollback only, and
  • throw an IllegalStateException. (JPA specifies this exception type.)
checkOpenback to summary
public void checkOpen(boolean markForRollbackIfClosed)

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.)
checkTransactionNeededForUpdateOperationback to summary
public default void checkTransactionNeededForUpdateOperation(String exceptionMessage)

Check if an active Transaction is available before performing an update operation against the database.

If an active transaction is necessary, but no transaction is active, a TransactionRequiredException is raised.

Parameters
exceptionMessage:String

the message to use for the TransactionRequiredException

flushback to summary
public void flush()

Flush this session.

generateEntityKeyback to summary
public EntityKey generateEntityKey(Object id, EntityPersister persister)

Instantiate an EntityKey with the given id and for the entity represented by the given EntityPersister.

Parameters
id:Object

The entity id

persister:EntityPersister

The entity persister

Returns:EntityKey

The entity key

getCacheModeback to summary
public CacheMode getCacheMode()

Redeclares org.hibernate.query.spi.QueryProducerImplementor.getCacheMode.

Get the current CacheMode for this session.

getCacheTransactionSynchronizationback to summary
public CacheTransactionSynchronization getCacheTransactionSynchronization()

The current CacheTransactionSynchronization associated with this session. This may be null if the session is not currently associated with an active transaction.

getConfiguredJdbcBatchSizeback to summary
public default Integer getConfiguredJdbcBatchSize()

Get the currently configured JDBC batch size, which might have been specified at either the session or factory level.

Returns:Integer

the session-level JDBC batch size is set, or the factory-level setting otherwise

Since
5.2
See Also
org.hibernate.boot.spi.SessionFactoryOptions#getJdbcBatchSize, org.hibernate.boot.SessionFactoryBuilder#applyJdbcBatchSize
getContextEntityIdentifierback to summary
public Object getContextEntityIdentifier(Object object)

Return the identifier of the persistent object, or null if it is not associated with this session.

getEntityPersisterback to summary
public EntityPersister getEntityPersister(@Nullable String entityName, Object object) throws HibernateException

Get the EntityPersister for the given entity instance.

Parameters
entityName:@Nullable String

optional entity name

object:Object

the entity instance

getEntityUsingInterceptorback to summary
public Object getEntityUsingInterceptor(EntityKey key) throws HibernateException

Get the entity instance associated with the given EntityKey, calling the Interceptor if necessary.

getEventListenerManagerback to summary
public SessionEventListenerManager getEventListenerManager()

Get the SessionEventListenerManager associated with this session.

getExceptionConverterback to summary
public ExceptionConverter getExceptionConverter()

Obtain an ExceptionConverter 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.

Returns:ExceptionConverter

the ExceptionConverter for this Session.

getFactoryback to summary
public SessionFactoryImplementor getFactory()

Redeclares org.hibernate.SharedSessionContract.getFactory, org.hibernate.query.spi.QueryProducerImplementor.getFactory.

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

Obtain the factory which created this session.

getFlushModeback to summary
public FlushModeType getFlushMode()

Deprecated

since 6.

there's no good reason to expose this here

Get the current FlushModeType 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's FlushMode. For the former behavior, use getHibernateFlushMode() instead.

Returns:FlushModeType

The FlushModeType in effect for this Session.

Annotations
@Deprecated
since:6
getHibernateFlushModeback to summary
public FlushMode getHibernateFlushMode()

Redeclares org.hibernate.query.spi.QueryProducerImplementor.getHibernateFlushMode.

Get the current FlushMode for this session.

Returns:FlushMode

The flush mode

getInterceptorback to summary
public Interceptor getInterceptor()

Retrieves the Interceptor associated with this session.

getJdbcCoordinatorback to summary
public JdbcCoordinator getJdbcCoordinator()

Obtain the JdbcCoordinator for this session.

getJdbcServicesback to summary
public JdbcServices getJdbcServices()

Obtain the JdbcServices for the factory which created this session.

getLoadQueryInfluencersback to summary
public LoadQueryInfluencers getLoadQueryInfluencers()

Get the LoadQueryInfluencers associated with this session.

Returns:LoadQueryInfluencers

the LoadQueryInfluencers associated with this session; should never be null.

getNativeJdbcParametersIgnoredback to summary
public boolean getNativeJdbcParametersIgnored()
getPersistenceContextback to summary
public PersistenceContext getPersistenceContext()

Get the persistence context for this session.

See getPersistenceContextInternal() for a faster alternative.

Implementation Note

This method is not extremely fast: if you need to call the PersistenceContext multiple times, prefer keeping a reference to it instead of invoking this method multiple times.

getPersistenceContextInternalback to summary
public PersistenceContext getPersistenceContextInternal()

Similar to getPersistenceContext(), with two differences:

  1. this version performs better as it allows for inlining and probably better prediction, and
  2. it skips some checks of the current state of the session.
Choose wisely: performance is important, but correctness comes first.
Returns:PersistenceContext

the PersistenceContext associated to this session.

getSessionback to summary
public default SharedSessionContractImplementor getSession()

Implements org.hibernate.type.descriptor.WrapperOptions.getSession.

Returns this object, fulfilling the contract of WrapperOptions.

Annotations
@Override
getSessionFactoryback to summary
public default SessionFactoryImplementor getSessionFactory()

Implements org.hibernate.type.descriptor.WrapperOptions.getSessionFactory.

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

Obtain the factory which created this session.

Annotations
@Override
getSessionIdentifierback to summary
public UUID getSessionIdentifier()

Obtain a UUID which uniquely identifies this session.

The UUID is useful mainly for logging.

getSessionTokenback to summary
public default Object getSessionToken()

Obtain a "token" which uniquely identifies this session.

getTypeConfigurationback to summary
public default TypeConfiguration getTypeConfiguration()

Implements org.hibernate.type.descriptor.java.JavaType.CoercionContext.getTypeConfiguration.

Obtain the TypeConfiguration for the factory which created this session.

Annotations
@Override
guessEntityNameback to summary
public String guessEntityName(Object entity) throws HibernateException

Obtain an estimate of the entity name of the given entity instance, which is not involved in an association, using only the org.hibernate.EntityNameResolver.

immediateLoadback to summary
public Object immediateLoad(String entityName, Object id) throws HibernateException

Load an instance immediately. This method is only called when lazily initializing a proxy. Do not return the proxy.

initializeCollectionback to summary
public void initializeCollection(PersistentCollection<?> collection, boolean writing) throws HibernateException

Initialize the given collection (if not already initialized).

instantiateback to summary
public Object instantiate(String entityName, Object id) throws HibernateException

Instantiate the entity class, initializing with the given identifier.

instantiateback to summary
public Object instantiate(EntityPersister persister, Object id) throws HibernateException

Instantiate the entity class of the given EntityPersister, initializing the new instance with the given identifier.

This is more efficient than instantiate(String, Object), but not always interchangeable, since a single persister might be responsible for multiple types.

internalLoadback to summary
public Object internalLoad(String entityName, Object id, boolean eager, boolean nullable) throws HibernateException

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, a null value is returned.

When eager = true, the object is eagerly fetched from the database.

isAutoCloseSessionEnabledback to summary
public boolean isAutoCloseSessionEnabled()

Deprecated

since 6.

there's no reason to expose this here

Is auto-close at transaction completion enabled?

Annotations
@Deprecated
since:6
See Also
org.hibernate.cfg.AvailableSettings#AUTO_CLOSE_SESSION, SessionFactoryOptions#isAutoCloseSessionEnabled()
isClosedback to summary
public boolean isClosed()

Determines whether the session is closed.

API Note

Provided separately from isOpen() as this method does not attempt any JTA synchronization registration, whereas isOpen() does. This one is better for most internal purposes.

Returns:boolean

true if the session is closed; false otherwise.

isCriteriaCopyTreeEnabledback to summary
public boolean isCriteriaCopyTreeEnabled()
isDefaultReadOnlyback to summary
public boolean isDefaultReadOnly()

Are entities and proxies loaded by this session read-only by default?

isEnforcingFetchGraphback to summary
public default boolean isEnforcingFetchGraph()

Deprecated

for removal since 6.

this is not used anywhere

Are we currently enforcing a fetch graph?

Annotations
@Deprecated
since:6
forRemoval:true
isEventSourceback to summary
public default boolean isEventSource()

Determines if this session implements EventSource.

Only stateful session are sources of events. If this object is a stateless session, this method return false.

isOpenOrWaitingForAutoCloseback to summary
public default boolean isOpenOrWaitingForAutoClose()

Determines whether the session is open or is waiting for auto-close.

Returns:boolean

true if the session is closed, or if it's waiting for auto-close; false otherwise.

isSessionImplementorback to summary
public default boolean isSessionImplementor()

Does this object implement SessionImplementor?

isStatelessSessionback to summary
public default boolean isStatelessSession()

Does this object implement StatelessSession?

isTransactionInProgressback to summary
public boolean isTransactionInProgress()

Does this session have an active Hibernate transaction, or is it associated with a JTA transaction currently in progress?

markForRollbackOnlyback to summary
public void markForRollbackOnly()

Marks current transaction, if any, for rollback only.

prepareForQueryExecutionback to summary
public void prepareForQueryExecution(boolean requiresTxn)

Prepare for the execution of a Query or org.hibernate.procedure.ProcedureCall

setAutoClearback to summary
public void setAutoClear(boolean enabled)

Deprecated

since 6.

there's no good reason to expose this here

Enable or disable automatic cache clearing from after transaction completion.

Annotations
@Deprecated
since:6
setCacheModeback to summary
public void setCacheMode(CacheMode cm)

Set the current CacheMode for this session.

setCriteriaCopyTreeEnabledback to summary
public void setCriteriaCopyTreeEnabled(boolean jpaCriteriaCopyComplianceEnabled)
setEnforcingFetchGraphback to summary
public default void setEnforcingFetchGraph(boolean enforcingFetchGraph)

Deprecated

for removal since 6.

this is not used anywhere

Enable or disable fetch graph enforcement.

Annotations
@Deprecated
since:6
forRemoval:true
setHibernateFlushModeback to summary
public void setHibernateFlushMode(FlushMode flushMode)

Set the current FlushMode 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).

Parameters
flushMode:FlushMode

the new flush mode

setNativeJdbcParametersIgnoredback to summary
public void setNativeJdbcParametersIgnored(boolean nativeJdbcParametersIgnored)
shouldAutoCloseback to summary
public boolean shouldAutoClose()

Deprecated

since 6.

there's no reason to expose this here

Should this session be automatically closed after the current transaction completes?

Annotations
@Deprecated
since:6