Package org.hibernate
Interface StatelessSessionBuilder
-
public interface StatelessSessionBuilderAllows creation of a newStatelessSessionwith specific options.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description StatelessSessionBuilderconnection(Connection connection)Adds a specific connection to the session options.StatelessSessionopenStatelessSession()Opens a session with the specified options.StatelessSessionBuilderstatementInspector(StatementInspector statementInspector)Applies the givenStatementInspectorto the stateless session.StatelessSessionBuildertenantIdentifier(Object tenantIdentifier)Define the tenant identifier to be associated with the opened session.StatelessSessionBuildertenantIdentifier(String tenantIdentifier)Deprecated, for removal: This API element is subject to removal in a future version.UsetenantIdentifier(Object)instead
-
-
-
Method Detail
-
openStatelessSession
StatelessSession openStatelessSession()
Opens a session with the specified options.- Returns:
- The session
-
connection
StatelessSessionBuilder connection(Connection connection)
Adds a specific connection to the session options.- Parameters:
connection- The connection to use.- Returns:
this, for method chaining
-
tenantIdentifier
@Deprecated(forRemoval=true) StatelessSessionBuilder tenantIdentifier(String tenantIdentifier)
Deprecated, for removal: This API element is subject to removal in a future version.UsetenantIdentifier(Object)insteadDefine the tenant identifier to be associated with the opened session.- Parameters:
tenantIdentifier- The tenant identifier.- Returns:
this, for method chaining
-
tenantIdentifier
StatelessSessionBuilder tenantIdentifier(Object tenantIdentifier)
Define the tenant identifier to be associated with the opened session.- Parameters:
tenantIdentifier- The tenant identifier.- Returns:
this, for method chaining- Since:
- 6.4
-
statementInspector
StatelessSessionBuilder statementInspector(StatementInspector statementInspector)
Applies the givenStatementInspectorto the stateless session.- Parameters:
statementInspector- The StatementInspector to use.- Returns:
this, for method chaining
-
-