public interface SessionBuilder
| Modifier and Type | Method and Description |
|---|---|
SessionBuilder |
autoClose(boolean autoClose)
Should the session be automatically closed after transaction completion
|
SessionBuilder |
autoJoinTransactions(boolean autoJoinTransactions)
Should the session built automatically join in any ongoing JTA transactions
|
SessionBuilder |
connection(Connection connection)
Adds a specific connection to the session options
|
SessionBuilder |
connectionReleaseMode(ConnectionReleaseMode connectionReleaseMode)
Use a specific connection release mode for these session options
|
SessionBuilder |
flushBeforeCompletion(boolean flushBeforeCompletion)
Should the session be automatically flushed during the "before completion" phase of transaction handling.
|
SessionBuilder |
interceptor(Interceptor interceptor)
Adds a specific interceptor to the session options
|
SessionBuilder |
noInterceptor()
Signifies that no
Interceptor should be used. |
Session |
openSession()
Opens a session with the specified options.
|
SessionBuilder |
tenantIdentifier(String tenantIdentifier)
Define the tenant identifier to be associated with the opened session.
|
Session openSession()
SessionBuilder interceptor(Interceptor interceptor)
interceptor - The interceptor to use.this, for method chainingSessionBuilder noInterceptor()
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 interceptor(Interceptor) with null has the same net effect.this, for method chainingSessionBuilder connection(Connection connection)
connection - The connection to use.this, for method chainingSessionBuilder connectionReleaseMode(ConnectionReleaseMode connectionReleaseMode)
connectionReleaseMode - The connection release mode to use.this, for method chainingSessionBuilder autoJoinTransactions(boolean autoJoinTransactions)
autoJoinTransactions - Should JTA transactions be automatically joinedthis, for method chainingSessionBuilder autoClose(boolean autoClose)
autoClose - Should the session be automatically closedthis, for method chainingSessionBuilder flushBeforeCompletion(boolean flushBeforeCompletion)
flushBeforeCompletion - Should the session be automatically flushedthis, for method chainingSessionBuilder tenantIdentifier(String tenantIdentifier)
tenantIdentifier - The tenant identifier.this, for method chainingCopyright © 2012 JBoss by Red Hat. All Rights Reserved.