Top Description Methods
org.hibernate

public Interface SharedSessionBuilder

extends SessionBuilder
Known Direct Implementers
org.hibernate.engine.spi.AbstractDelegatingSharedSessionBuilder, org.hibernate.internal.SessionImpl.SharedSessionBuilderImpl
Imports
java.sql.Connection

Specialized SessionBuilder with access to stuff from another session.
Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public SharedSessionBuilder

Returns:

this, for method chaining
autoClose
()

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

public SharedSessionBuilder
autoClose(boolean
Should the session be automatically closed
autoClose
)

Redeclares org.hibernate.SessionBuilder.autoClose.

Should the session be automatically closed after transaction completion?
public SharedSessionBuilder

Returns:

this, for method chaining
autoJoinTransactions
()

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

public SharedSessionBuilder
autoJoinTransactions(boolean
Should JTA transactions be automatically joined
autoJoinTransactions
)

Redeclares org.hibernate.SessionBuilder.autoJoinTransactions.

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

Returns:

this, for method chaining
connection
()

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

public SharedSessionBuilder
connection(Connection
The connection to use.
connection
)

Redeclares org.hibernate.SessionBuilder.connection.

Adds a specific connection to the session options.
public SharedSessionBuilder

Returns:

this, for method chaining
connectionHandlingMode
()

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

public SharedSessionBuilder

Returns:

this, for method chaining
connectionReleaseMode
()

Deprecated since 6.0. use connectionHandlingMode instead.
Signifies that the connection release mode from the original session should be used to create the new session.
public SharedSessionBuilder

Returns:

this, for method chaining
flushMode
()

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

public SharedSessionBuilder

Returns:

this, for method chaining
interceptor
()

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

public SharedSessionBuilder
interceptor(Interceptor
The interceptor to use.
interceptor
)

Redeclares org.hibernate.SessionBuilder.interceptor.

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

Redeclares org.hibernate.SessionBuilder.noInterceptor.

Signifies that no Interceptor should be used.
Inherited from org.hibernate.SessionBuilder:
autoClearclearEventListenersconnectionHandlingModeeventListenersflushModejdbcTimeZoneopenSessionstatementInspectortenantIdentifiertenantIdentifier

Method Detail

autoCloseback to summary
public SharedSessionBuilder autoClose()

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

Returns:SharedSessionBuilder

this, for method chaining

autoCloseback to summary
public SharedSessionBuilder autoClose(boolean autoClose)

Redeclares org.hibernate.SessionBuilder.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:SharedSessionBuilder

this, for method chaining

Annotations
@Override
autoJoinTransactionsback to summary
public SharedSessionBuilder autoJoinTransactions()

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

Returns:SharedSessionBuilder

this, for method chaining

autoJoinTransactionsback to summary
public SharedSessionBuilder autoJoinTransactions(boolean autoJoinTransactions)

Redeclares org.hibernate.SessionBuilder.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:SharedSessionBuilder

this, for method chaining

Annotations
@Override
connectionback to summary
public SharedSessionBuilder connection()

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

Returns:SharedSessionBuilder

this, for method chaining

connectionback to summary
public SharedSessionBuilder connection(Connection connection)

Redeclares org.hibernate.SessionBuilder.connection.

Doc from org.hibernate.SessionBuilder.connection.

Adds a specific connection to the session options.

Parameters
connection:Connection

The connection to use.

Returns:SharedSessionBuilder

this, for method chaining

Annotations
@Override
connectionHandlingModeback to summary
public SharedSessionBuilder connectionHandlingMode()

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

Returns:SharedSessionBuilder

this, for method chaining

connectionReleaseModeback to summary
public SharedSessionBuilder connectionReleaseMode()

Deprecated

since 6.0.

use connectionHandlingMode instead.

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

Returns:SharedSessionBuilder

this, for method chaining

Annotations
@Deprecated
since:6.0
flushModeback to summary
public SharedSessionBuilder flushMode()

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

Returns:SharedSessionBuilder

this, for method chaining

interceptorback to summary
public SharedSessionBuilder interceptor()

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

Returns:SharedSessionBuilder

this, for method chaining

interceptorback to summary
public SharedSessionBuilder interceptor(Interceptor interceptor)

Redeclares org.hibernate.SessionBuilder.interceptor.

Doc from org.hibernate.SessionBuilder.interceptor.

Adds a specific interceptor to the session options.

Parameters
interceptor:Interceptor

The interceptor to use.

Returns:SharedSessionBuilder

this, for method chaining

Annotations
@Override
noInterceptorback to summary
public SharedSessionBuilder noInterceptor()

Redeclares org.hibernate.SessionBuilder.noInterceptor.

Doc from org.hibernate.SessionBuilder.noInterceptor.

Signifies that no Interceptor should be used.

By default, if no Interceptor is explicitly specified, the Interceptor associated with the SessionFactory is inherited by the new Session.

Calling interceptor(Interceptor) with null has the same effect.

Returns:SharedSessionBuilder

this, for method chaining

Annotations
@Override