Package org.hibernate
Interface SharedSessionBuilder<T extends SharedSessionBuilder>
-
- All Superinterfaces:
SessionBuilder<T>
- All Known Implementing Classes:
AbstractDelegatingSharedSessionBuilder
public interface SharedSessionBuilder<T extends SharedSessionBuilder> extends SessionBuilder<T>
SpecializedSessionBuilder
with access to stuff from another session.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description T
autoClose()
Signifies that the autoClose flag from the original session should be used to create the new session.T
autoClose(boolean autoClose)
Should the session be automatically closed after transaction completion?T
autoJoinTransactions()
Signifies that the autoJoinTransaction flag from the original session should be used to create the new session.T
autoJoinTransactions(boolean autoJoinTransactions)
Should the session built automatically join in any ongoing JTA transactions.T
connection()
Signifies that the connection from the original session should be used to create the new session.T
connection(Connection connection)
Adds a specific connection to the session options.T
connectionHandlingMode()
Signifies that the connection release mode from the original session should be used to create the new session.T
connectionReleaseMode()
Deprecated.useconnectionHandlingMode()
instead.T
flushMode()
Signifies that the FlushMode from the original session should be used to create the new session.T
interceptor()
Signifies the interceptor from the original session should be used to create the new session.T
interceptor(Interceptor interceptor)
Adds a specific interceptor to the session options.T
noInterceptor()
Signifies that noInterceptor
should be used.-
Methods inherited from interface org.hibernate.SessionBuilder
autoClear, clearEventListeners, connectionHandlingMode, eventListeners, flushMode, jdbcTimeZone, openSession, statementInspector, tenantIdentifier
-
-
-
-
Method Detail
-
connection
T connection()
Signifies that the connection from the original session should be used to create the new session.- Returns:
this
, for method chaining
-
interceptor
T interceptor()
Signifies the interceptor from the original session should be used to create the new session.- Returns:
this
, for method chaining
-
connectionReleaseMode
@Deprecated(since="6.0") T connectionReleaseMode()
Deprecated.useconnectionHandlingMode()
instead.Signifies that the connection release mode from the original session should be used to create the new session.- Returns:
this
, for method chaining
-
connectionHandlingMode
T connectionHandlingMode()
Signifies that the connection release mode from the original session should be used to create the new session.- Returns:
this
, for method chaining
-
autoJoinTransactions
T autoJoinTransactions()
Signifies that the autoJoinTransaction flag from the original session should be used to create the new session.- Returns:
this
, for method chaining
-
flushMode
T flushMode()
Signifies that the FlushMode from the original session should be used to create the new session.- Returns:
this
, for method chaining
-
autoClose
T autoClose()
Signifies that the autoClose flag from the original session should be used to create the new session.- Returns:
this
, for method chaining
-
interceptor
T interceptor(Interceptor interceptor)
Description copied from interface:SessionBuilder
Adds a specific interceptor to the session options.- Specified by:
interceptor
in interfaceSessionBuilder<T extends SharedSessionBuilder>
- Parameters:
interceptor
- The interceptor to use.- Returns:
this
, for method chaining
-
noInterceptor
T noInterceptor()
Description copied from interface:SessionBuilder
Signifies that noInterceptor
should be used. By default, if noInterceptor
is explicitly specified, theInterceptor
associated with theSessionFactory
is inherited by the newSession
. CallingSessionBuilder.interceptor(Interceptor)
with null has the same effect.- Specified by:
noInterceptor
in interfaceSessionBuilder<T extends SharedSessionBuilder>
- Returns:
this
, for method chaining
-
connection
T connection(Connection connection)
Description copied from interface:SessionBuilder
Adds a specific connection to the session options.- Specified by:
connection
in interfaceSessionBuilder<T extends SharedSessionBuilder>
- Parameters:
connection
- The connection to use.- Returns:
this
, for method chaining
-
autoJoinTransactions
T autoJoinTransactions(boolean autoJoinTransactions)
Description copied from interface:SessionBuilder
Should the session built automatically join in any ongoing JTA transactions.- Specified by:
autoJoinTransactions
in interfaceSessionBuilder<T extends SharedSessionBuilder>
- Parameters:
autoJoinTransactions
- Should JTA transactions be automatically joined- Returns:
this
, for method chaining- See Also:
SynchronizationType.SYNCHRONIZED
-
autoClose
T autoClose(boolean autoClose)
Description copied from interface:SessionBuilder
Should the session be automatically closed after transaction completion?- Specified by:
autoClose
in interfaceSessionBuilder<T extends SharedSessionBuilder>
- Parameters:
autoClose
- Should the session be automatically closed- Returns:
this
, for method chaining- See Also:
PersistenceContextType
-
-