public interface SharedSessionBuilder<T extends SharedSessionBuilder> extends SessionBuilder<T>
Specialized SessionBuilder with access to stuff from another session.
| Modifier and Type | Method and 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.
(snce 6.0) use
connectionHandlingMode() instead. |
T |
connectionReleaseMode(ConnectionReleaseMode connectionReleaseMode)
Use a specific connection release mode for these session options.
|
default T |
flushBeforeCompletion()
Deprecated.
(since 5.2) use
flushMode() instead. |
default T |
flushBeforeCompletion(boolean flushBeforeCompletion)
Should the session be automatically flushed during the "before completion" phase of transaction handling.
|
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 no
Interceptor should be used. |
default T |
transactionContext()
Deprecated.
Use
connection() instead |
autoClear, clearEventListeners, connectionHandlingMode, eventListeners, flushMode, jdbcTimeZone, openSession, setQueryParameterValidation, statementInspector, tenantIdentifier@Deprecated default T transactionContext()
connection() insteadSignifies that the transaction context from the original session should be used to create the new session.
this, for method chainingT connection()
Signifies that the connection from the original session should be used to create the new session.
this, for method chainingT interceptor()
Signifies the interceptor from the original session should be used to create the new session.
this, for method chaining@Deprecated T connectionReleaseMode()
connectionHandlingMode() instead.Signifies that the connection release mode from the original session should be used to create the new session.
this, for method chainingT connectionHandlingMode()
Signifies that the connection release mode from the original session should be used to create the new session.
this, for method chainingT autoJoinTransactions()
Signifies that the autoJoinTransaction flag from the original session should be used to create the new session.
this, for method chainingT flushMode()
Signifies that the FlushMode from the original session should be used to create the new session.
this, for method chainingT autoClose()
Signifies that the autoClose flag from the original session should be used to create the new session.
this, for method chaining@Deprecated default T flushBeforeCompletion()
flushMode() instead.Signifies that the flushBeforeCompletion flag from the original session should be used to create the new session.
this, for method chainingT interceptor(Interceptor interceptor)
SessionBuilderAdds a specific interceptor to the session options.
interceptor in interface SessionBuilder<T extends SharedSessionBuilder>interceptor - The interceptor to use.this, for method chainingT noInterceptor()
SessionBuilderSignifies that no Interceptor should be used.
<p/>
By default the Interceptor associated with the SessionFactory is passed to the
Session whenever we open one without the user having specified a specific interceptor to
use.
<p/>
Calling SessionBuilder.interceptor(Interceptor) with null has the same net effect.
noInterceptor in interface SessionBuilder<T extends SharedSessionBuilder>this, for method chainingT connection(Connection connection)
SessionBuilderAdds a specific connection to the session options.
connection in interface SessionBuilder<T extends SharedSessionBuilder>connection - The connection to use.this, for method chainingT connectionReleaseMode(ConnectionReleaseMode connectionReleaseMode)
SessionBuilderUse a specific connection release mode for these session options.
connectionReleaseMode in interface SessionBuilder<T extends SharedSessionBuilder>connectionReleaseMode - The connection release mode to use.this, for method chainingT autoJoinTransactions(boolean autoJoinTransactions)
SessionBuilderShould the session built automatically join in any ongoing JTA transactions.
autoJoinTransactions in interface SessionBuilder<T extends SharedSessionBuilder>autoJoinTransactions - Should JTA transactions be automatically joinedthis, for method chainingSynchronizationType.SYNCHRONIZEDT autoClose(boolean autoClose)
SessionBuilderShould the session be automatically closed after transaction completion?
autoClose in interface SessionBuilder<T extends SharedSessionBuilder>autoClose - Should the session be automatically closedthis, for method chainingPersistenceContextTypedefault T flushBeforeCompletion(boolean flushBeforeCompletion)
SessionBuilderShould the session be automatically flushed during the "before completion" phase of transaction handling.
flushBeforeCompletion in interface SessionBuilder<T extends SharedSessionBuilder>flushBeforeCompletion - Should the session be automatically flushedthis, for method chainingCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.