Session with specific options.
| Modifier and Type | Method and Description |
|---|---|
| public SessionBuilder | Returns: this, for method chainingWhether the Session should be automatically cleared autoClear)Should the session be automatically cleared on a failed transaction? |
| public SessionBuilder | Returns: this, for method chainingShould the session be automatically closed autoClose)Should the session be automatically closed after transaction completion? |
| public SessionBuilder | Returns: this, for method chainingShould JTA transactions be automatically joined autoJoinTransactions)Should the session built automatically join in any ongoing JTA transactions. |
| public SessionBuilder | Returns: this, for method chainingRemove all listeners intended for the built session currently held here, including any auto-apply ones; in other words, start with a clean slate. |
| public SessionBuilder | Returns: this, for method chainingThe connection to use. connection)Adds a specific connection to the session options. |
| public SessionBuilder | Returns: this, for method chainingThe connection handling mode to use. mode)Signifies that the connection release mode from the original session should be used to create the new session. |
| public SessionBuilder | Returns: this, for method chainingThe listeners to incorporate into the built Session listeners)Add one or more |
| public SessionBuilder | |
| public SessionBuilder | Returns: this, for method chainingThe interceptor to use. interceptor)Adds a specific interceptor to the session options. |
| public SessionBuilder | |
| public SessionBuilder | |
| public Session | |
| public SessionBuilder | Returns: this, for method chainingThe StatementInspector to use. statementInspector)Applies the given |
| public SessionBuilder | Returns: this, for method chainingThe tenant identifier. tenantIdentifier)
Deprecated
for removal. Use
Define the tenant identifier to be associated with the opened session.
tenantIdentifier(Object) instead
|
| public SessionBuilder | Returns: this, for method chainingThe tenant identifier. tenantIdentifier)Define the tenant identifier to be associated with the opened session. |
| autoClear | back to summary |
|---|---|
| public SessionBuilder autoClear(boolean autoClear) Should the session be automatically cleared on a failed transaction?
| |
| autoClose | back to summary |
|---|---|
| public SessionBuilder autoClose(boolean autoClose) Should the session be automatically closed after transaction completion?
| |
| autoJoinTransactions | back to summary |
|---|---|
| public SessionBuilder autoJoinTransactions(boolean autoJoinTransactions) Should the session built automatically join in any ongoing JTA transactions.
| |
| clearEventListeners | back to summary |
|---|---|
| public 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.
| |
| connection | back to summary |
|---|---|
| public SessionBuilder connection(Connection connection) Adds a specific connection to the session options.
| |
| connectionHandlingMode | back to summary |
|---|---|
| public SessionBuilder connectionHandlingMode(PhysicalConnectionHandlingMode mode) Signifies that the connection release mode from the original session should be used to create the new session.
| |
| eventListeners | back to summary |
|---|---|
| public SessionBuilder eventListeners(SessionEventListener... listeners) Add one or more
| |
| flushMode | back to summary |
|---|---|
| public SessionBuilder flushMode(FlushMode flushMode) Specify the initial FlushMode to use for the opened Session
| |
| interceptor | back to summary |
|---|---|
| public SessionBuilder interceptor(Interceptor interceptor) Adds a specific interceptor to the session options.
| |
| jdbcTimeZone | back to summary |
|---|---|
| public SessionBuilder jdbcTimeZone(TimeZone timeZone) | |
| noInterceptor | back to summary |
|---|---|
| public SessionBuilder noInterceptor() Signifies that no
By default, if no
Calling
| |
| openSession | back to summary |
|---|---|
| public Session openSession() Opens a session with the specified options.
| |
| statementInspector | back to summary |
|---|---|
| public SessionBuilder statementInspector(StatementInspector statementInspector) Applies the given
| |
| tenantIdentifier | back to summary |
|---|---|
| public SessionBuilder tenantIdentifier(String tenantIdentifier)
Define the tenant identifier to be associated with the opened session.
| |
| tenantIdentifier | back to summary |
|---|---|
| public SessionBuilder tenantIdentifier(Object tenantIdentifier) Define the tenant identifier to be associated with the opened session.
| |