public interface SharedSessionBuilder<T extends SharedSessionBuilder> extends SessionBuilder<T>
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()
insteadthis
, for method chainingT connection()
this
, for method chainingT interceptor()
this
, for method chaining@Deprecated T connectionReleaseMode()
connectionHandlingMode()
instead.this
, for method chainingT connectionHandlingMode()
this
, for method chainingT autoJoinTransactions()
this
, for method chainingT flushMode()
this
, for method chainingT autoClose()
this
, for method chaining@Deprecated default T flushBeforeCompletion()
flushMode()
instead.this
, for method chainingT interceptor(Interceptor interceptor)
SessionBuilder
interceptor
in interface SessionBuilder<T extends SharedSessionBuilder>
interceptor
- The interceptor to use.this
, for method chainingT noInterceptor()
SessionBuilder
Interceptor
should be used.
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.
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)
SessionBuilder
connection
in interface SessionBuilder<T extends SharedSessionBuilder>
connection
- The connection to use.this
, for method chainingT connectionReleaseMode(ConnectionReleaseMode connectionReleaseMode)
SessionBuilder
connectionReleaseMode
in interface SessionBuilder<T extends SharedSessionBuilder>
connectionReleaseMode
- The connection release mode to use.this
, for method chainingT autoJoinTransactions(boolean autoJoinTransactions)
SessionBuilder
autoJoinTransactions
in interface SessionBuilder<T extends SharedSessionBuilder>
autoJoinTransactions
- Should JTA transactions be automatically joinedthis
, for method chainingSynchronizationType.SYNCHRONIZED
T autoClose(boolean autoClose)
SessionBuilder
autoClose
in interface SessionBuilder<T extends SharedSessionBuilder>
autoClose
- Should the session be automatically closedthis
, for method chainingPersistenceContextType
default T flushBeforeCompletion(boolean flushBeforeCompletion)
SessionBuilder
flushBeforeCompletion
in interface SessionBuilder<T extends SharedSessionBuilder>
flushBeforeCompletion
- Should the session be automatically flushedthis
, for method chainingCopyright © 2019 JBoss by Red Hat. All rights reserved.