类 AbstractDelegatingSharedSessionBuilder<T extends SharedSessionBuilder>
- java.lang.Object
-
- org.hibernate.engine.spi.AbstractDelegatingSharedSessionBuilder<T>
-
- 所有已实现的接口:
SessionBuilder<T>,SharedSessionBuilder<T>
public abstract class AbstractDelegatingSharedSessionBuilder<T extends SharedSessionBuilder> extends Object implements SharedSessionBuilder<T>
Base class forSharedSessionBuilderimplementations that wish to implement only parts of that contract themselves while forwarding other method invocations to a delegate instance.- 作者:
- Gunnar Morling, Guillaume Smet
-
-
构造器概要
构造器 构造器 说明 AbstractDelegatingSharedSessionBuilder(SharedSessionBuilder delegate)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 TautoClear(boolean autoClear)Should the session be automatically cleared on a failed transaction?TautoClose()Signifies that the autoClose flag from the original session should be used to create the new session.TautoClose(boolean autoClose)Should the session be automatically closed after transaction completion?TautoJoinTransactions()Signifies that the autoJoinTransaction flag from the original session should be used to create the new session.TautoJoinTransactions(boolean autoJoinTransactions)Should the session built automatically join in any ongoing JTA transactions.TclearEventListeners()Remove all listeners intended for the built Session currently held here, including any auto-apply ones; in other words, start with a clean slate.Tconnection()Signifies that the connection from the original session should be used to create the new session.Tconnection(Connection connection)Adds a specific connection to the session options.TconnectionHandlingMode()Signifies that the connection release mode from the original session should be used to create the new session.TconnectionHandlingMode(PhysicalConnectionHandlingMode mode)Signifies that the connection release mode from the original session should be used to create the new session.TconnectionReleaseMode()Signifies that the connection release mode from the original session should be used to create the new session.TconnectionReleaseMode(ConnectionReleaseMode connectionReleaseMode)Use a specific connection release mode for these session options.SharedSessionBuilderdelegate()TeventListeners(SessionEventListener... listeners)Apply one or more SessionEventListener instances to the listeners for the Session to be built.TflushBeforeCompletion()Signifies that the flushBeforeCompletion flag from the original session should be used to create the new session.TflushBeforeCompletion(boolean flushBeforeCompletion)Should the session be automatically flushed during the "before completion" phase of transaction handling.TflushMode()Signifies that the FlushMode from the original session should be used to create the new session.TflushMode(FlushMode flushMode)Specify the initial FlushMode to use for the opened Sessionprotected TgetThis()Tinterceptor()Signifies the interceptor from the original session should be used to create the new session.Tinterceptor(Interceptor interceptor)Adds a specific interceptor to the session options.TjdbcTimeZone(TimeZone timeZone)TnoInterceptor()Signifies that noInterceptorshould be used.SessionopenSession()Opens a session with the specified options.TstatementInspector(StatementInspector statementInspector)Applies a specific StatementInspector to the session options.TtenantIdentifier(String tenantIdentifier)Define the tenant identifier to be associated with the opened session.-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 org.hibernate.SessionBuilder
setQueryParameterValidation
-
从接口继承的方法 org.hibernate.SharedSessionBuilder
transactionContext
-
-
-
-
构造器详细资料
-
AbstractDelegatingSharedSessionBuilder
public AbstractDelegatingSharedSessionBuilder(SharedSessionBuilder delegate)
-
-
方法详细资料
-
getThis
protected T getThis()
-
delegate
public SharedSessionBuilder delegate()
-
openSession
public Session openSession()
从接口复制的说明:SessionBuilderOpens a session with the specified options.- 指定者:
openSession在接口中SessionBuilder<T extends SharedSessionBuilder>- 返回:
- The session
-
interceptor
public T interceptor()
从接口复制的说明:SharedSessionBuilderSignifies the interceptor from the original session should be used to create the new session.- 指定者:
interceptor在接口中SharedSessionBuilder<T extends SharedSessionBuilder>- 返回:
this, for method chaining
-
connection
public T connection()
从接口复制的说明:SharedSessionBuilderSignifies that the connection from the original session should be used to create the new session.- 指定者:
connection在接口中SharedSessionBuilder<T extends SharedSessionBuilder>- 返回:
this, for method chaining
-
connectionReleaseMode
public T connectionReleaseMode()
从接口复制的说明:SharedSessionBuilderSignifies that the connection release mode from the original session should be used to create the new session.- 指定者:
connectionReleaseMode在接口中SharedSessionBuilder<T extends SharedSessionBuilder>- 返回:
this, for method chaining
-
connectionHandlingMode
public T connectionHandlingMode()
从接口复制的说明:SharedSessionBuilderSignifies that the connection release mode from the original session should be used to create the new session.- 指定者:
connectionHandlingMode在接口中SharedSessionBuilder<T extends SharedSessionBuilder>- 返回:
this, for method chaining
-
autoJoinTransactions
public T autoJoinTransactions()
从接口复制的说明:SharedSessionBuilderSignifies that the autoJoinTransaction flag from the original session should be used to create the new session.- 指定者:
autoJoinTransactions在接口中SharedSessionBuilder<T extends SharedSessionBuilder>- 返回:
this, for method chaining
-
autoClose
public T autoClose()
从接口复制的说明:SharedSessionBuilderSignifies that the autoClose flag from the original session should be used to create the new session.- 指定者:
autoClose在接口中SharedSessionBuilder<T extends SharedSessionBuilder>- 返回:
this, for method chaining
-
flushBeforeCompletion
public T flushBeforeCompletion()
从接口复制的说明:SharedSessionBuilderSignifies that the flushBeforeCompletion flag from the original session should be used to create the new session.- 指定者:
flushBeforeCompletion在接口中SharedSessionBuilder<T extends SharedSessionBuilder>- 返回:
this, for method chaining
-
interceptor
public T interceptor(Interceptor interceptor)
从接口复制的说明:SessionBuilderAdds a specific interceptor to the session options.- 指定者:
interceptor在接口中SessionBuilder<T extends SharedSessionBuilder>- 指定者:
interceptor在接口中SharedSessionBuilder<T extends SharedSessionBuilder>- 参数:
interceptor- The interceptor to use.- 返回:
this, for method chaining
-
noInterceptor
public T noInterceptor()
从接口复制的说明:SessionBuilderSignifies that noInterceptorshould be used. By default theInterceptorassociated with theSessionFactoryis passed to theSessionwhenever we open one without the user having specified a specific interceptor to use. CallingSessionBuilder.interceptor(Interceptor)with null has the same net effect.- 指定者:
noInterceptor在接口中SessionBuilder<T extends SharedSessionBuilder>- 指定者:
noInterceptor在接口中SharedSessionBuilder<T extends SharedSessionBuilder>- 返回:
this, for method chaining
-
statementInspector
public T statementInspector(StatementInspector statementInspector)
从接口复制的说明:SessionBuilderApplies a specific StatementInspector to the session options.- 指定者:
statementInspector在接口中SessionBuilder<T extends SharedSessionBuilder>- 参数:
statementInspector- The StatementInspector to use.- 返回:
this, for method chaining
-
connection
public T connection(Connection connection)
从接口复制的说明:SessionBuilderAdds a specific connection to the session options.- 指定者:
connection在接口中SessionBuilder<T extends SharedSessionBuilder>- 指定者:
connection在接口中SharedSessionBuilder<T extends SharedSessionBuilder>- 参数:
connection- The connection to use.- 返回:
this, for method chaining
-
connectionReleaseMode
public T connectionReleaseMode(ConnectionReleaseMode connectionReleaseMode)
从接口复制的说明:SessionBuilderUse a specific connection release mode for these session options.- 指定者:
connectionReleaseMode在接口中SessionBuilder<T extends SharedSessionBuilder>- 指定者:
connectionReleaseMode在接口中SharedSessionBuilder<T extends SharedSessionBuilder>- 参数:
connectionReleaseMode- The connection release mode to use.- 返回:
this, for method chaining
-
autoJoinTransactions
public T autoJoinTransactions(boolean autoJoinTransactions)
从接口复制的说明:SessionBuilderShould the session built automatically join in any ongoing JTA transactions.- 指定者:
autoJoinTransactions在接口中SessionBuilder<T extends SharedSessionBuilder>- 指定者:
autoJoinTransactions在接口中SharedSessionBuilder<T extends SharedSessionBuilder>- 参数:
autoJoinTransactions- Should JTA transactions be automatically joined- 返回:
this, for method chaining- 另请参阅:
SynchronizationType.SYNCHRONIZED
-
autoClose
public T autoClose(boolean autoClose)
从接口复制的说明:SessionBuilderShould the session be automatically closed after transaction completion?- 指定者:
autoClose在接口中SessionBuilder<T extends SharedSessionBuilder>- 指定者:
autoClose在接口中SharedSessionBuilder<T extends SharedSessionBuilder>- 参数:
autoClose- Should the session be automatically closed- 返回:
this, for method chaining- 另请参阅:
PersistenceContextType
-
flushBeforeCompletion
public T flushBeforeCompletion(boolean flushBeforeCompletion)
从接口复制的说明:SessionBuilderShould the session be automatically flushed during the "before completion" phase of transaction handling.- 指定者:
flushBeforeCompletion在接口中SessionBuilder<T extends SharedSessionBuilder>- 指定者:
flushBeforeCompletion在接口中SharedSessionBuilder<T extends SharedSessionBuilder>- 参数:
flushBeforeCompletion- Should the session be automatically flushed- 返回:
this, for method chaining
-
tenantIdentifier
public T tenantIdentifier(String tenantIdentifier)
从接口复制的说明:SessionBuilderDefine the tenant identifier to be associated with the opened session.- 指定者:
tenantIdentifier在接口中SessionBuilder<T extends SharedSessionBuilder>- 参数:
tenantIdentifier- The tenant identifier.- 返回:
this, for method chaining
-
eventListeners
public T eventListeners(SessionEventListener... listeners)
从接口复制的说明:SessionBuilderApply one or more SessionEventListener instances to the listeners for the Session to be built.- 指定者:
eventListeners在接口中SessionBuilder<T extends SharedSessionBuilder>- 参数:
listeners- The listeners to incorporate into the built Session- 返回:
this, for method chaining
-
clearEventListeners
public T clearEventListeners()
从接口复制的说明:SessionBuilderRemove 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- 指定者:
clearEventListeners在接口中SessionBuilder<T extends SharedSessionBuilder>
-
connectionHandlingMode
public T connectionHandlingMode(PhysicalConnectionHandlingMode mode)
从接口复制的说明:SessionBuilderSignifies that the connection release mode from the original session should be used to create the new session.- 指定者:
connectionHandlingMode在接口中SessionBuilder<T extends SharedSessionBuilder>- 参数:
mode- The connection handling mode to use.- 返回:
this, for method chaining
-
autoClear
public T autoClear(boolean autoClear)
从接口复制的说明:SessionBuilderShould the session be automatically cleared on a failed transaction?- 指定者:
autoClear在接口中SessionBuilder<T extends SharedSessionBuilder>- 参数:
autoClear- Whether the Session should be automatically cleared- 返回:
this, for method chaining
-
flushMode
public T flushMode(FlushMode flushMode)
从接口复制的说明:SessionBuilderSpecify the initial FlushMode to use for the opened Session- 指定者:
flushMode在接口中SessionBuilder<T extends SharedSessionBuilder>- 参数:
flushMode- The initial FlushMode to use for the opened Session- 返回:
this, for method chaining- 另请参阅:
PersistenceContextType
-
flushMode
public T flushMode()
从接口复制的说明:SharedSessionBuilderSignifies that the FlushMode from the original session should be used to create the new session.- 指定者:
flushMode在接口中SharedSessionBuilder<T extends SharedSessionBuilder>- 返回:
this, for method chaining
-
jdbcTimeZone
public T jdbcTimeZone(TimeZone timeZone)
- 指定者:
jdbcTimeZone在接口中SessionBuilder<T extends SharedSessionBuilder>
-
-