public abstract class AbstractDelegatingSharedSessionBuilder extends java.lang.Object implements SharedSessionBuilder
SharedSessionBuilder implementations that wish to implement only parts of that contract
themselves while forwarding other method invocations to a delegate instance.| Constructor and Description |
|---|
AbstractDelegatingSharedSessionBuilder(SharedSessionBuilder delegate) |
| Modifier and Type | Method and Description |
|---|---|
SharedSessionBuilder |
autoClose()
Signifies that the autoClose flag from the original session should be used to create the new session.
|
SharedSessionBuilder |
autoClose(boolean autoClose)
Should the session be automatically closed after transaction completion.
|
SharedSessionBuilder |
autoJoinTransactions()
Signifies that the autoJoinTransaction flag from the original session should be used to create the new session.
|
SharedSessionBuilder |
autoJoinTransactions(boolean autoJoinTransactions)
Should the session built automatically join in any ongoing JTA transactions.
|
SessionBuilder |
clearEventListeners()
Remove all listeners intended for the built Session currently held here, including any auto-apply ones; in other
words, start with a clean slate.
|
SharedSessionBuilder |
connection()
Signifies that the connection from the original session should be used to create the new session.
|
SharedSessionBuilder |
connection(java.sql.Connection connection)
Adds a specific connection to the session options.
|
SharedSessionBuilder |
connectionReleaseMode()
Signifies that the connection release mode from the original session should be used to create the new session.
|
SharedSessionBuilder |
connectionReleaseMode(ConnectionReleaseMode connectionReleaseMode)
Use a specific connection release mode for these session options.
|
SessionBuilder |
eventListeners(SessionEventListener... listeners)
Apply one or more SessionEventListener instances to the listeners for the Session to be built.
|
SharedSessionBuilder |
flushBeforeCompletion()
Signifies that the flushBeforeCompletion flag from the original session should be used to create the new session.
|
SharedSessionBuilder |
flushBeforeCompletion(boolean flushBeforeCompletion)
Should the session be automatically flushed during the "before completion" phase of transaction handling.
|
SharedSessionBuilder |
interceptor()
Signifies the interceptor from the original session should be used to create the new session.
|
SharedSessionBuilder |
interceptor(Interceptor interceptor)
Adds a specific interceptor to the session options.
|
SharedSessionBuilder |
noInterceptor()
Signifies that no
Interceptor should be used. |
Session |
openSession()
Opens a session with the specified options.
|
SessionBuilder |
statementInspector(StatementInspector statementInspector)
Applies a specific StatementInspector to the session options.
|
SessionBuilder |
tenantIdentifier(java.lang.String tenantIdentifier)
Define the tenant identifier to be associated with the opened session.
|
SharedSessionBuilder |
transactionContext()
Signifies that the transaction context from the original session should be used to create the new session.
|
public AbstractDelegatingSharedSessionBuilder(SharedSessionBuilder delegate)
public Session openSession()
SessionBuilderopenSession in interface SessionBuilderpublic SharedSessionBuilder interceptor()
SharedSessionBuilderinterceptor in interface SharedSessionBuilderthis, for method chainingpublic SharedSessionBuilder connection()
SharedSessionBuilderconnection in interface SharedSessionBuilderthis, for method chainingpublic SharedSessionBuilder connectionReleaseMode()
SharedSessionBuilderconnectionReleaseMode in interface SharedSessionBuilderthis, for method chainingpublic SharedSessionBuilder autoJoinTransactions()
SharedSessionBuilderautoJoinTransactions in interface SharedSessionBuilderthis, for method chainingpublic SharedSessionBuilder autoClose()
SharedSessionBuilderautoClose in interface SharedSessionBuilderthis, for method chainingpublic SharedSessionBuilder flushBeforeCompletion()
SharedSessionBuilderflushBeforeCompletion in interface SharedSessionBuilderthis, for method chainingpublic SharedSessionBuilder transactionContext()
SharedSessionBuildertransactionContext in interface SharedSessionBuilderthis, for method chainingpublic SharedSessionBuilder interceptor(Interceptor interceptor)
SessionBuilderinterceptor in interface SessionBuilderinterceptor in interface SharedSessionBuilderinterceptor - The interceptor to use.this, for method chainingpublic SharedSessionBuilder noInterceptor()
SessionBuilderInterceptor 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 SessionBuildernoInterceptor in interface SharedSessionBuilderthis, for method chainingpublic SessionBuilder statementInspector(StatementInspector statementInspector)
SessionBuilderstatementInspector in interface SessionBuilderstatementInspector - The StatementInspector to use.this, for method chainingpublic SharedSessionBuilder connection(java.sql.Connection connection)
SessionBuilderconnection in interface SessionBuilderconnection in interface SharedSessionBuilderconnection - The connection to use.this, for method chainingpublic SharedSessionBuilder connectionReleaseMode(ConnectionReleaseMode connectionReleaseMode)
SessionBuilderconnectionReleaseMode in interface SessionBuilderconnectionReleaseMode in interface SharedSessionBuilderconnectionReleaseMode - The connection release mode to use.this, for method chainingpublic SharedSessionBuilder autoJoinTransactions(boolean autoJoinTransactions)
SessionBuilderautoJoinTransactions in interface SessionBuilderautoJoinTransactions in interface SharedSessionBuilderautoJoinTransactions - Should JTA transactions be automatically joinedthis, for method chainingpublic SharedSessionBuilder autoClose(boolean autoClose)
SessionBuilderautoClose in interface SessionBuilderautoClose in interface SharedSessionBuilderautoClose - Should the session be automatically closedthis, for method chainingpublic SharedSessionBuilder flushBeforeCompletion(boolean flushBeforeCompletion)
SessionBuilderflushBeforeCompletion in interface SessionBuilderflushBeforeCompletion in interface SharedSessionBuilderflushBeforeCompletion - Should the session be automatically flushedthis, for method chainingpublic SessionBuilder tenantIdentifier(java.lang.String tenantIdentifier)
SessionBuildertenantIdentifier in interface SessionBuildertenantIdentifier - The tenant identifier.this, for method chainingpublic SessionBuilder eventListeners(SessionEventListener... listeners)
SessionBuildereventListeners in interface SessionBuilderlisteners - The listeners to incorporate into the built Sessionthis, for method chainingpublic SessionBuilder clearEventListeners()
SessionBuilderthis, for method chainingclearEventListeners in interface SessionBuilderCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.