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 Constructor Description StatelessSessionBuilderImpl(SessionFactoryImpl sessionFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StatelessSessionBuilder
connection(Connection connection)
Adds a specific connection to the session options.Connection
getConnection()
List<SessionEventListener>
getCustomSessionEventListener()
ExceptionMapper
getExceptionMapper()
FlushMode
getInitialSessionFlushMode()
Interceptor
getInterceptor()
TimeZone
getJdbcTimeZone()
PhysicalConnectionHandlingMode
getPhysicalConnectionHandlingMode()
StatementInspector
getStatementInspector()
String
getTenantIdentifier()
StatelessSession
openStatelessSession()
Opens a session with the specified options.boolean
shouldAutoClear()
boolean
shouldAutoClose()
boolean
shouldAutoJoinTransactions()
StatelessSessionBuilder
tenantIdentifier(String tenantIdentifier)
Define the tenant identifier to be associated with the opened session.
-
-
-
Constructor Detail
-
StatelessSessionBuilderImpl
public StatelessSessionBuilderImpl(SessionFactoryImpl sessionFactory)
-
-
Method Detail
-
openStatelessSession
public StatelessSession openStatelessSession()
Description copied from interface:StatelessSessionBuilder
Opens a session with the specified options.- Specified by:
openStatelessSession
in interfaceStatelessSessionBuilder
- Returns:
- The session
-
connection
public StatelessSessionBuilder connection(Connection 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
public StatelessSessionBuilder tenantIdentifier(String 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
-
shouldAutoJoinTransactions
public boolean shouldAutoJoinTransactions()
- Specified by:
shouldAutoJoinTransactions
in interfaceSessionCreationOptions
-
getInitialSessionFlushMode
public FlushMode getInitialSessionFlushMode()
- Specified by:
getInitialSessionFlushMode
in interfaceSessionCreationOptions
-
shouldAutoClose
public boolean shouldAutoClose()
- Specified by:
shouldAutoClose
in interfaceSessionCreationOptions
-
shouldAutoClear
public boolean shouldAutoClear()
- Specified by:
shouldAutoClear
in interfaceSessionCreationOptions
-
getConnection
public Connection getConnection()
- Specified by:
getConnection
in interfaceSessionCreationOptions
-
getInterceptor
public Interceptor getInterceptor()
- Specified by:
getInterceptor
in interfaceSessionCreationOptions
-
getStatementInspector
public StatementInspector getStatementInspector()
- Specified by:
getStatementInspector
in interfaceSessionCreationOptions
-
getPhysicalConnectionHandlingMode
public PhysicalConnectionHandlingMode getPhysicalConnectionHandlingMode()
- Specified by:
getPhysicalConnectionHandlingMode
in interfaceSessionCreationOptions
-
getTenantIdentifier
public String getTenantIdentifier()
- Specified by:
getTenantIdentifier
in interfaceSessionCreationOptions
-
getJdbcTimeZone
public TimeZone getJdbcTimeZone()
- Specified by:
getJdbcTimeZone
in interfaceSessionCreationOptions
-
getCustomSessionEventListener
public List<SessionEventListener> 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
public ExceptionMapper getExceptionMapper()
- Specified by:
getExceptionMapper
in interfaceSessionCreationOptions
-
-