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 StatelessSessionBuilderconnection(Connection connection)Adds a specific connection to the session options.ConnectiongetConnection()List<SessionEventListener>getCustomSessionEventListener()ExceptionMappergetExceptionMapper()FlushModegetInitialSessionFlushMode()InterceptorgetInterceptor()TimeZonegetJdbcTimeZone()PhysicalConnectionHandlingModegetPhysicalConnectionHandlingMode()StatementInspectorgetStatementInspector()StringgetTenantIdentifier()StatelessSessionopenStatelessSession()Opens a session with the specified options.booleanshouldAutoClear()booleanshouldAutoClose()booleanshouldAutoJoinTransactions()StatelessSessionBuildertenantIdentifier(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:StatelessSessionBuilderOpens a session with the specified options.- Specified by:
openStatelessSessionin interfaceStatelessSessionBuilder- Returns:
- The session
-
connection
public StatelessSessionBuilder connection(Connection connection)
Description copied from interface:StatelessSessionBuilderAdds a specific connection to the session options.- Specified by:
connectionin interfaceStatelessSessionBuilder- Parameters:
connection- The connection to use.- Returns:
this, for method chaining
-
tenantIdentifier
public StatelessSessionBuilder tenantIdentifier(String tenantIdentifier)
Description copied from interface:StatelessSessionBuilderDefine the tenant identifier to be associated with the opened session.- Specified by:
tenantIdentifierin interfaceStatelessSessionBuilder- Parameters:
tenantIdentifier- The tenant identifier.- Returns:
this, for method chaining
-
shouldAutoJoinTransactions
public boolean shouldAutoJoinTransactions()
- Specified by:
shouldAutoJoinTransactionsin interfaceSessionCreationOptions
-
getInitialSessionFlushMode
public FlushMode getInitialSessionFlushMode()
- Specified by:
getInitialSessionFlushModein interfaceSessionCreationOptions
-
shouldAutoClose
public boolean shouldAutoClose()
- Specified by:
shouldAutoClosein interfaceSessionCreationOptions
-
shouldAutoClear
public boolean shouldAutoClear()
- Specified by:
shouldAutoClearin interfaceSessionCreationOptions
-
getConnection
public Connection getConnection()
- Specified by:
getConnectionin interfaceSessionCreationOptions
-
getInterceptor
public Interceptor getInterceptor()
- Specified by:
getInterceptorin interfaceSessionCreationOptions
-
getStatementInspector
public StatementInspector getStatementInspector()
- Specified by:
getStatementInspectorin interfaceSessionCreationOptions
-
getPhysicalConnectionHandlingMode
public PhysicalConnectionHandlingMode getPhysicalConnectionHandlingMode()
- Specified by:
getPhysicalConnectionHandlingModein interfaceSessionCreationOptions
-
getTenantIdentifier
public String getTenantIdentifier()
- Specified by:
getTenantIdentifierin interfaceSessionCreationOptions
-
getJdbcTimeZone
public TimeZone getJdbcTimeZone()
- Specified by:
getJdbcTimeZonein interfaceSessionCreationOptions
-
getCustomSessionEventListener
public List<SessionEventListener> getCustomSessionEventListener()
- Specified by:
getCustomSessionEventListenerin 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:
getExceptionMapperin interfaceSessionCreationOptions
-
-