程序包 org.hibernate
接口 StatelessSessionBuilder<T extends StatelessSessionBuilder>
-
public interface StatelessSessionBuilder<T extends StatelessSessionBuilder>Represents a consolidation of all stateless session creation options into a builder style delegate.- 作者:
- Steve Ebersole
-
-
方法概要
所有方法 实例方法 抽象方法 默认方法 修饰符和类型 方法 说明 Tconnection(Connection connection)Adds a specific connection to the session options.StatelessSessionopenStatelessSession()Opens a session with the specified options.default TsetQueryParameterValidation(boolean enabled)ShouldQuery.setParameter(javax.persistence.Parameter<java.time.Instant>, java.time.Instant, javax.persistence.TemporalType)perform parameter validation when the Session is bootstrapped via JPAEntityManagerFactoryTtenantIdentifier(String tenantIdentifier)Define the tenant identifier to be associated with the opened session.
-
-
-
方法详细资料
-
openStatelessSession
StatelessSession openStatelessSession()
Opens a session with the specified options.- 返回:
- The session
-
connection
T connection(Connection connection)
Adds a specific connection to the session options.- 参数:
connection- The connection to use.- 返回:
this, for method chaining
-
tenantIdentifier
T tenantIdentifier(String tenantIdentifier)
Define the tenant identifier to be associated with the opened session.- 参数:
tenantIdentifier- The tenant identifier.- 返回:
this, for method chaining
-
setQueryParameterValidation
default T setQueryParameterValidation(boolean enabled)
ShouldQuery.setParameter(javax.persistence.Parameter<java.time.Instant>, java.time.Instant, javax.persistence.TemporalType)perform parameter validation when the Session is bootstrapped via JPAEntityManagerFactory- 参数:
enabled-trueindicates the validation should be performed,falseotherwiseThe default value is
true- 返回:
this, for method chaining
-
-