Package org.hibernate.internal
Class SessionFactoryImpl.StatelessSessionBuilderImpl
java.lang.Object
org.hibernate.internal.SessionFactoryImpl.StatelessSessionBuilderImpl
- All Implemented Interfaces:
SessionCreationOptions
,StatelessSessionBuilder
- Enclosing class:
- SessionFactoryImpl
public static class SessionFactoryImpl.StatelessSessionBuilderImpl
extends Object
implements StatelessSessionBuilder, SessionCreationOptions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconnection
(Connection connection) Adds a specific connection to the session options.int
boolean
boolean
Opens a session with the specified options.boolean
boolean
boolean
statementInspector
(UnaryOperator<String> operator) Applies the given statement inspection function to the session.statementInspector
(StatementInspector statementInspector) Deprecated.tenantIdentifier
(Object tenantIdentifier) Define the tenant identifier to be associated with the opened session.tenantIdentifier
(String tenantIdentifier) Deprecated.
-
Constructor Details
-
StatelessSessionBuilderImpl
-
-
Method Details
-
openStatelessSession
Description copied from interface:StatelessSessionBuilder
Opens a session with the specified options.- Specified by:
openStatelessSession
in interfaceStatelessSessionBuilder
- Returns:
- The session
-
connection
Description copied from interface:StatelessSessionBuilder
Adds a specific connection to the session options.- Specified by:
connection
in interfaceStatelessSessionBuilder
- Parameters:
connection
- The connection to use.- Returns:
this
, for method chaining
-
tenantIdentifier
Deprecated.Description copied from interface:StatelessSessionBuilder
Define the tenant identifier to be associated with the opened session.- Specified by:
tenantIdentifier
in interfaceStatelessSessionBuilder
- Parameters:
tenantIdentifier
- The tenant identifier.- Returns:
this
, for method chaining
-
tenantIdentifier
Description copied from interface:StatelessSessionBuilder
Define the tenant identifier to be associated with the opened session.- Specified by:
tenantIdentifier
in interfaceStatelessSessionBuilder
- Parameters:
tenantIdentifier
- The tenant identifier.- Returns:
this
, for method chaining
-
statementInspector
@Deprecated public StatelessSessionBuilder statementInspector(StatementInspector statementInspector) Deprecated.Description copied from interface:StatelessSessionBuilder
Applies the givenStatementInspector
to the session.- Specified by:
statementInspector
in interfaceStatelessSessionBuilder
- Parameters:
statementInspector
- TheStatementInspector
to use.- Returns:
this
, for method chaining
-
statementInspector
Description copied from interface:StatelessSessionBuilder
Applies the given statement inspection function to the session.- Specified by:
statementInspector
in interfaceStatelessSessionBuilder
- Parameters:
operator
- An operator which accepts a SQL string, returning a processed SQL string to be used by Hibernate instead of the given original SQL. Alternatively. the operator may work by side effect, and simply return the original SQL.- Returns:
this
, for method chaining
-
shouldAutoJoinTransactions
public boolean shouldAutoJoinTransactions()- Specified by:
shouldAutoJoinTransactions
in interfaceSessionCreationOptions
-
getInitialSessionFlushMode
- Specified by:
getInitialSessionFlushMode
in interfaceSessionCreationOptions
-
isSubselectFetchEnabled
public boolean isSubselectFetchEnabled()- Specified by:
isSubselectFetchEnabled
in interfaceSessionCreationOptions
-
getDefaultBatchFetchSize
public int getDefaultBatchFetchSize()- Specified by:
getDefaultBatchFetchSize
in interfaceSessionCreationOptions
-
shouldAutoClose
public boolean shouldAutoClose()- Specified by:
shouldAutoClose
in interfaceSessionCreationOptions
-
shouldAutoClear
public boolean shouldAutoClear()- Specified by:
shouldAutoClear
in interfaceSessionCreationOptions
-
getConnection
- Specified by:
getConnection
in interfaceSessionCreationOptions
-
getInterceptor
- Specified by:
getInterceptor
in interfaceSessionCreationOptions
-
isIdentifierRollbackEnabled
public boolean isIdentifierRollbackEnabled()- Specified by:
isIdentifierRollbackEnabled
in interfaceSessionCreationOptions
-
getStatementInspector
- Specified by:
getStatementInspector
in interfaceSessionCreationOptions
-
getPhysicalConnectionHandlingMode
- Specified by:
getPhysicalConnectionHandlingMode
in interfaceSessionCreationOptions
-
getTenantIdentifier
- Specified by:
getTenantIdentifier
in interfaceSessionCreationOptions
-
getTenantIdentifierValue
- Specified by:
getTenantIdentifierValue
in interfaceSessionCreationOptions
-
getJdbcTimeZone
- Specified by:
getJdbcTimeZone
in interfaceSessionCreationOptions
-
getCustomSessionEventListener
- Specified by:
getCustomSessionEventListener
in interfaceSessionCreationOptions
- Returns:
- the full list of SessionEventListener if this was customized, or null if this Session is being created with the default list.
-
getExceptionMapper
- Specified by:
getExceptionMapper
in interfaceSessionCreationOptions
-