Top Description Fields Constructors Methods
org.hibernate.engine.spi

public abstract Class AbstractDelegatingSharedSessionBuilder<T extends org.hibernate.SharedSessionBuilder<T extends org.hibernate.SharedSessionBuilder>>

extends Object
implements SharedSessionBuilder<T extends SharedSessionBuilder<T extends SharedSessionBuilder>>
Class Inheritance
All Implemented Interfaces
org.hibernate.SharedSessionBuilder, org.hibernate.SessionBuilder
Annotations
@SuppressWarnings:unused
Imports
java.sql.Connection, java.util.TimeZone, org.hibernate.ConnectionReleaseMode, .FlushMode, .Interceptor, .Session, .SessionBuilder, .SessionEventListener, .SharedSessionBuilder, org.hibernate.resource.jdbc.spi.PhysicalConnectionHandlingMode, .StatementInspector

Base class for SharedSessionBuilder implementations that wish to implement only parts of that contract themselves while forwarding other method invocations to a delegate instance.
Authors
Gunnar Morling, Guillaume Smet

Field Summary

Modifier and TypeField and Description
private final SharedSessionBuilder<T extends SharedSessionBuilder>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public T
autoClear(boolean
Whether the Session should be automatically cleared
autoClear
)

Implements org.hibernate.SessionBuilder.autoClear.

Should the session be automatically cleared on a failed transaction?
public T
autoClose()

Implements org.hibernate.SharedSessionBuilder.autoClose.

Signifies that the autoClose flag from the original session should be used to create the new session.
public T
autoClose(boolean
Should the session be automatically closed
autoClose
)

Implements org.hibernate.SharedSessionBuilder.autoClose.

Should the session be automatically closed after transaction completion?
public T
autoJoinTransactions()

Implements org.hibernate.SharedSessionBuilder.autoJoinTransactions.

Signifies that the autoJoinTransaction flag from the original session should be used to create the new session.
public T
autoJoinTransactions(boolean
Should JTA transactions be automatically joined
autoJoinTransactions
)

Implements org.hibernate.SharedSessionBuilder.autoJoinTransactions.

Should the session built automatically join in any ongoing JTA transactions.
public T
clearEventListeners()

Implements org.hibernate.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.
public T
connection()

Implements org.hibernate.SharedSessionBuilder.connection.

Signifies that the connection from the original session should be used to create the new session.
public T
connection(Connection
The connection to use.
connection
)

Implements org.hibernate.SharedSessionBuilder.connection.

Adds a specific connection to the session options.
public T
connectionHandlingMode()

Implements org.hibernate.SharedSessionBuilder.connectionHandlingMode.

Signifies that the connection release mode from the original session should be used to create the new session.
public T
connectionHandlingMode(PhysicalConnectionHandlingMode
The connection handling mode to use.
mode
)

Implements org.hibernate.SessionBuilder.connectionHandlingMode.

Signifies that the connection release mode from the original session should be used to create the new session.
public T
connectionReleaseMode()

Implements org.hibernate.SharedSessionBuilder.connectionReleaseMode.

Signifies that the connection release mode from the original session should be used to create the new session.
public T
connectionReleaseMode(ConnectionReleaseMode
The connection release mode to use.
connectionReleaseMode
)

Implements org.hibernate.SharedSessionBuilder.connectionReleaseMode.

Use a specific connection release mode for these session options.
public SharedSessionBuilder<T extends SharedSessionBuilder>
public T
eventListeners(SessionEventListener...
The listeners to incorporate into the built Session
listeners
)

Implements org.hibernate.SessionBuilder.eventListeners.

Apply one or more SessionEventListener instances to the listeners for the Session to be built.
public T
flushBeforeCompletion()

Overrides default org.hibernate.SharedSessionBuilder.flushBeforeCompletion.

Signifies that the flushBeforeCompletion flag from the original session should be used to create the new session.
public T
flushBeforeCompletion(boolean
Should the session be automatically flushed
flushBeforeCompletion
)

Overrides default org.hibernate.SharedSessionBuilder.flushBeforeCompletion.

Should the session be automatically flushed during the "before completion" phase of transaction handling.
public T
flushMode(FlushMode
The initial FlushMode to use for the opened Session
flushMode
)

Implements org.hibernate.SessionBuilder.flushMode.

Specify the initial FlushMode to use for the opened Session
public T
flushMode()

Implements org.hibernate.SharedSessionBuilder.flushMode.

Signifies that the FlushMode from the original session should be used to create the new session.
protected T
public T
interceptor()

Implements org.hibernate.SharedSessionBuilder.interceptor.

Signifies the interceptor from the original session should be used to create the new session.
public T
interceptor(Interceptor
The interceptor to use.
interceptor
)

Implements org.hibernate.SharedSessionBuilder.interceptor.

Adds a specific interceptor to the session options.
public T
public T
noInterceptor()

Implements org.hibernate.SharedSessionBuilder.noInterceptor.

Signifies that no Interceptor should be used.
public Session
openSession()

Implements org.hibernate.SessionBuilder.openSession.

Deprecated as a consequence of Session being deprecated.
Opens a session with the specified options.
public T
statementInspector(StatementInspector
The StatementInspector to use.
statementInspector
)

Implements org.hibernate.SessionBuilder.statementInspector.

Applies a specific StatementInspector to the session options.
public T
tenantIdentifier(String
The tenant identifier.
tenantIdentifier
)

Implements org.hibernate.SessionBuilder.tenantIdentifier.

Define the tenant identifier to be associated with the opened session.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

delegateback to summary
private final SharedSessionBuilder<T extends SharedSessionBuilder> delegate

Constructor Detail

AbstractDelegatingSharedSessionBuilderback to summary
public AbstractDelegatingSharedSessionBuilder(SharedSessionBuilder<T extends SharedSessionBuilder> delegate)

Method Detail

autoClearback to summary
public T autoClear(boolean autoClear)

Implements org.hibernate.SessionBuilder.autoClear.

Doc from org.hibernate.SessionBuilder.autoClear.

Should the session be automatically cleared on a failed transaction?

Parameters
autoClear:boolean

Whether the Session should be automatically cleared

Returns:T

this, for method chaining

Annotations
@Override
autoCloseback to summary
public T autoClose()

Implements org.hibernate.SharedSessionBuilder.autoClose.

Doc from org.hibernate.SharedSessionBuilder.autoClose.

Signifies that the autoClose flag from the original session should be used to create the new session.

Returns:T

this, for method chaining

Annotations
@Override
autoCloseback to summary
public T autoClose(boolean autoClose)

Implements org.hibernate.SharedSessionBuilder.autoClose.

Doc from org.hibernate.SessionBuilder.autoClose.

Should the session be automatically closed after transaction completion?

Parameters
autoClose:boolean

Should the session be automatically closed

Returns:T

this, for method chaining

Annotations
@Override
autoJoinTransactionsback to summary
public T autoJoinTransactions()

Implements org.hibernate.SharedSessionBuilder.autoJoinTransactions.

Doc from org.hibernate.SharedSessionBuilder.autoJoinTransactions.

Signifies that the autoJoinTransaction flag from the original session should be used to create the new session.

Returns:T

this, for method chaining

Annotations
@Override
autoJoinTransactionsback to summary
public T autoJoinTransactions(boolean autoJoinTransactions)

Implements org.hibernate.SharedSessionBuilder.autoJoinTransactions.

Doc from org.hibernate.SessionBuilder.autoJoinTransactions.

Should the session built automatically join in any ongoing JTA transactions.

Parameters
autoJoinTransactions:boolean

Should JTA transactions be automatically joined

Returns:T

this, for method chaining

Annotations
@Override
clearEventListenersback to summary
public T clearEventListeners()

Implements org.hibernate.SessionBuilder.clearEventListeners.

Doc from org.hibernate.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. this, for method chaining

Annotations
@Override
connectionback to summary
public T connection()

Implements org.hibernate.SharedSessionBuilder.connection.

Doc from org.hibernate.SharedSessionBuilder.connection.

Signifies that the connection from the original session should be used to create the new session.

Returns:T

this, for method chaining

Annotations
@Override
connectionback to summary
public T connection(Connection connection)

Implements org.hibernate.SharedSessionBuilder.connection.

Doc from org.hibernate.SessionBuilder.connection.

Adds a specific connection to the session options.

Parameters
connection:Connection

The connection to use.

Returns:T

this, for method chaining

Annotations
@Override
connectionHandlingModeback to summary
public T connectionHandlingMode()

Implements org.hibernate.SharedSessionBuilder.connectionHandlingMode.

Doc from org.hibernate.SharedSessionBuilder.connectionHandlingMode.

Signifies that the connection release mode from the original session should be used to create the new session.

Returns:T

this, for method chaining

Annotations
@Override
connectionHandlingModeback to summary
public T connectionHandlingMode(PhysicalConnectionHandlingMode mode)

Implements org.hibernate.SessionBuilder.connectionHandlingMode.

Doc from org.hibernate.SessionBuilder.connectionHandlingMode.

Signifies that the connection release mode from the original session should be used to create the new session.

Parameters
mode:PhysicalConnectionHandlingMode

The connection handling mode to use.

Returns:T

this, for method chaining

Annotations
@Override
connectionReleaseModeback to summary
public T connectionReleaseMode()

Implements org.hibernate.SharedSessionBuilder.connectionReleaseMode.

Doc from org.hibernate.SharedSessionBuilder.connectionReleaseMode.

Signifies that the connection release mode from the original session should be used to create the new session.

Returns:T

this, for method chaining

Annotations
@SuppressWarnings:deprecation
@Override
connectionReleaseModeback to summary
public T connectionReleaseMode(ConnectionReleaseMode connectionReleaseMode)

Implements org.hibernate.SharedSessionBuilder.connectionReleaseMode.

Doc from org.hibernate.SessionBuilder.connectionReleaseMode.

Use a specific connection release mode for these session options.

Parameters
connectionReleaseMode:ConnectionReleaseMode

The connection release mode to use.

Returns:T

this, for method chaining

Annotations
@SuppressWarnings:deprecation
@Override
delegateback to summary
public SharedSessionBuilder<T extends SharedSessionBuilder> delegate()
eventListenersback to summary
public T eventListeners(SessionEventListener... listeners)

Implements org.hibernate.SessionBuilder.eventListeners.

Doc from org.hibernate.SessionBuilder.eventListeners.

Apply one or more SessionEventListener instances to the listeners for the Session to be built.

Parameters
listeners:SessionEventListener[]

The listeners to incorporate into the built Session

Returns:T

this, for method chaining

Annotations
@Override
flushBeforeCompletionback to summary
public T flushBeforeCompletion()

Overrides default org.hibernate.SharedSessionBuilder.flushBeforeCompletion.

Doc from org.hibernate.SharedSessionBuilder.flushBeforeCompletion.

Signifies that the flushBeforeCompletion flag from the original session should be used to create the new session.

Returns:T

this, for method chaining

Annotations
@SuppressWarnings:deprecation
@Override
flushBeforeCompletionback to summary
public T flushBeforeCompletion(boolean flushBeforeCompletion)

Overrides default org.hibernate.SharedSessionBuilder.flushBeforeCompletion.

Doc from org.hibernate.SessionBuilder.flushBeforeCompletion.

Should the session be automatically flushed during the "before completion" phase of transaction handling.

Parameters
flushBeforeCompletion:boolean

Should the session be automatically flushed

Returns:T

this, for method chaining

Annotations
@SuppressWarnings:deprecation
@Override
flushModeback to summary
public T flushMode(FlushMode flushMode)

Implements org.hibernate.SessionBuilder.flushMode.

Doc from org.hibernate.SessionBuilder.flushMode.

Specify the initial FlushMode to use for the opened Session

Parameters
flushMode:FlushMode

The initial FlushMode to use for the opened Session

Returns:T

this, for method chaining

Annotations
@Override
flushModeback to summary
public T flushMode()

Implements org.hibernate.SharedSessionBuilder.flushMode.

Doc from org.hibernate.SharedSessionBuilder.flushMode.

Signifies that the FlushMode from the original session should be used to create the new session.

Returns:T

this, for method chaining

Annotations
@Override
getThisback to summary
protected T getThis()
Annotations
@SuppressWarnings:unchecked
interceptorback to summary
public T interceptor()

Implements org.hibernate.SharedSessionBuilder.interceptor.

Doc from org.hibernate.SharedSessionBuilder.interceptor.

Signifies the interceptor from the original session should be used to create the new session.

Returns:T

this, for method chaining

Annotations
@Override
interceptorback to summary
public T interceptor(Interceptor interceptor)

Implements org.hibernate.SharedSessionBuilder.interceptor.

Doc from org.hibernate.SessionBuilder.interceptor.

Adds a specific interceptor to the session options.

Parameters
interceptor:Interceptor

The interceptor to use.

Returns:T

this, for method chaining

Annotations
@Override
jdbcTimeZoneback to summary
public T jdbcTimeZone(TimeZone timeZone)

Implements org.hibernate.SessionBuilder.jdbcTimeZone.

Annotations
@Override
noInterceptorback to summary
public T noInterceptor()

Implements org.hibernate.SharedSessionBuilder.noInterceptor.

Doc from org.hibernate.SessionBuilder.noInterceptor.

Signifies that no 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.

Returns:T

this, for method chaining

Annotations
@Override
openSessionback to summary
public Session openSession()

Implements org.hibernate.SessionBuilder.openSession.

Doc from org.hibernate.SessionBuilder.openSession.

Deprecated

as a consequence of Session being deprecated. See corresponding docs for further information.

Opens a session with the specified options.

Returns:Session

The session

Annotations
@Override
statementInspectorback to summary
public T statementInspector(StatementInspector statementInspector)

Implements org.hibernate.SessionBuilder.statementInspector.

Doc from org.hibernate.SessionBuilder.statementInspector.

Applies a specific StatementInspector to the session options.

Parameters
statementInspector:StatementInspector

The StatementInspector to use.

Returns:T

this, for method chaining

Annotations
@Override
tenantIdentifierback to summary
public T tenantIdentifier(String tenantIdentifier)

Implements org.hibernate.SessionBuilder.tenantIdentifier.

Doc from org.hibernate.SessionBuilder.tenantIdentifier.

Define the tenant identifier to be associated with the opened session.

Parameters
tenantIdentifier:String

The tenant identifier.

Returns:T

this, for method chaining

Annotations
@Override