Package org.hibernate.boot.spi
Interface SessionFactoryOptions
-
- All Known Implementing Classes:
AbstractDelegatingSessionFactoryOptions
public interface SessionFactoryOptions
Aggregator of special options used to build the SessionFactory.- Since:
- 5.0
-
-
Method Summary
-
-
-
Method Detail
-
getUuid
java.lang.String getUuid()
Get the UUID unique to this SessionFactoryOptions. Will be the same value available asSessionFactoryImplementor.getUuid()
.- Returns:
- The UUID for this SessionFactory.
- See Also:
SessionFactoryRegistry.getSessionFactory(java.lang.String)
,SessionFactoryImplementor.getUuid()
-
getServiceRegistry
StandardServiceRegistry getServiceRegistry()
The service registry to use in building the factory.- Returns:
- The service registry to use.
-
getBeanManagerReference
java.lang.Object getBeanManagerReference()
-
getValidatorFactoryReference
java.lang.Object getValidatorFactoryReference()
-
isJpaBootstrap
boolean isJpaBootstrap()
Was building of the SessionFactory initiated through JPA bootstrapping, or through Hibernate's native bootstrapping?- Returns:
true
indicates the SessionFactory was built through JPA bootstrapping;false
indicates it was built through native bootstrapping.
-
isJtaTransactionAccessEnabled
boolean isJtaTransactionAccessEnabled()
-
isAllowRefreshDetachedEntity
default boolean isAllowRefreshDetachedEntity()
-
getSessionFactoryName
java.lang.String getSessionFactoryName()
The name to be used for the SessionFactory. This is use both in:- in-VM serialization
- JNDI binding, depending on
isSessionFactoryNameAlsoJndiName()
- Returns:
- The SessionFactory name
-
isSessionFactoryNameAlsoJndiName
boolean isSessionFactoryNameAlsoJndiName()
Is theSesssionFactory name
also a JNDI name, indicating we should bind it into JNDI?- Returns:
true
if the SessionFactory name is also a JNDI name;false
otherwise.
-
isFlushBeforeCompletionEnabled
boolean isFlushBeforeCompletionEnabled()
-
isAutoCloseSessionEnabled
boolean isAutoCloseSessionEnabled()
-
isStatisticsEnabled
boolean isStatisticsEnabled()
-
getInterceptor
Interceptor getInterceptor()
Get the interceptor to use by default for all sessions opened from this factory.- Returns:
- The interceptor to use factory wide. May be
null
-
getStatelessInterceptorImplementor
@Deprecated java.lang.Class<? extends Interceptor> getStatelessInterceptorImplementor()
Deprecated.usegetStatelessInterceptorImplementorSupplier()
instead.Get the interceptor to use by default for all sessions opened from this factory.- Returns:
- The interceptor to use factory wide. May be
null
-
getStatelessInterceptorImplementorSupplier
default java.util.function.Supplier<? extends Interceptor> getStatelessInterceptorImplementorSupplier()
Get the interceptor to use by default for all sessions opened from this factory.- Returns:
- The interceptor to use factory wide. May be
null
-
getStatementInspector
StatementInspector getStatementInspector()
-
getSessionFactoryObservers
SessionFactoryObserver[] getSessionFactoryObservers()
-
getBaselineSessionEventsListenerBuilder
BaselineSessionEventsListenerBuilder getBaselineSessionEventsListenerBuilder()
-
isIdentifierRollbackEnabled
boolean isIdentifierRollbackEnabled()
-
getDefaultEntityMode
EntityMode getDefaultEntityMode()
-
getEntityTuplizerFactory
EntityTuplizerFactory getEntityTuplizerFactory()
-
isCheckNullability
boolean isCheckNullability()
-
isInitializeLazyStateOutsideTransactionsEnabled
boolean isInitializeLazyStateOutsideTransactionsEnabled()
-
getMultiTableBulkIdStrategy
MultiTableBulkIdStrategy getMultiTableBulkIdStrategy()
-
getTempTableDdlTransactionHandling
TempTableDdlTransactionHandling getTempTableDdlTransactionHandling()
-
getBatchFetchStyle
BatchFetchStyle getBatchFetchStyle()
-
isDelayBatchFetchLoaderCreationsEnabled
boolean isDelayBatchFetchLoaderCreationsEnabled()
-
getDefaultBatchFetchSize
int getDefaultBatchFetchSize()
-
getMaximumFetchDepth
java.lang.Integer getMaximumFetchDepth()
-
getDefaultNullPrecedence
NullPrecedence getDefaultNullPrecedence()
-
isOrderUpdatesEnabled
boolean isOrderUpdatesEnabled()
-
isOrderInsertsEnabled
boolean isOrderInsertsEnabled()
-
getMultiTenancyStrategy
MultiTenancyStrategy getMultiTenancyStrategy()
-
getCurrentTenantIdentifierResolver
CurrentTenantIdentifierResolver getCurrentTenantIdentifierResolver()
-
isJtaTrackByThread
boolean isJtaTrackByThread()
-
getQuerySubstitutions
java.util.Map getQuerySubstitutions()
-
isStrictJpaQueryLanguageCompliance
@Deprecated default boolean isStrictJpaQueryLanguageCompliance()
Deprecated.UseJpaCompliance.isJpaQueryComplianceEnabled()
instead viagetJpaCompliance()
-
isNamedQueryStartupCheckingEnabled
boolean isNamedQueryStartupCheckingEnabled()
-
isConventionalJavaConstants
boolean isConventionalJavaConstants()
-
isSecondLevelCacheEnabled
boolean isSecondLevelCacheEnabled()
-
isQueryCacheEnabled
boolean isQueryCacheEnabled()
-
getTimestampsCacheFactory
TimestampsCacheFactory getTimestampsCacheFactory()
-
getCacheRegionPrefix
java.lang.String getCacheRegionPrefix()
-
isMinimalPutsEnabled
boolean isMinimalPutsEnabled()
-
isStructuredCacheEntriesEnabled
boolean isStructuredCacheEntriesEnabled()
-
isDirectReferenceCacheEntriesEnabled
boolean isDirectReferenceCacheEntriesEnabled()
-
isAutoEvictCollectionCache
boolean isAutoEvictCollectionCache()
-
getSchemaAutoTooling
SchemaAutoTooling getSchemaAutoTooling()
-
getJdbcBatchSize
int getJdbcBatchSize()
-
isJdbcBatchVersionedData
boolean isJdbcBatchVersionedData()
-
isScrollableResultSetsEnabled
boolean isScrollableResultSetsEnabled()
-
isWrapResultSetsEnabled
boolean isWrapResultSetsEnabled()
-
isGetGeneratedKeysEnabled
boolean isGetGeneratedKeysEnabled()
-
getJdbcFetchSize
java.lang.Integer getJdbcFetchSize()
-
getPhysicalConnectionHandlingMode
PhysicalConnectionHandlingMode getPhysicalConnectionHandlingMode()
-
doesConnectionProviderDisableAutoCommit
default boolean doesConnectionProviderDisableAutoCommit()
-
getConnectionReleaseMode
@Deprecated ConnectionReleaseMode getConnectionReleaseMode()
Deprecated.UsegetPhysicalConnectionHandlingMode()
instead
-
isCommentsEnabled
boolean isCommentsEnabled()
-
getCustomEntityDirtinessStrategy
CustomEntityDirtinessStrategy getCustomEntityDirtinessStrategy()
-
getEntityNameResolvers
EntityNameResolver[] getEntityNameResolvers()
-
getEntityNotFoundDelegate
EntityNotFoundDelegate getEntityNotFoundDelegate()
Get the delegate for handling entity-not-found exception conditions.- Returns:
- The specific EntityNotFoundDelegate to use, May be
null
-
getCustomSqlFunctionMap
java.util.Map<java.lang.String,SQLFunction> getCustomSqlFunctionMap()
-
setCheckNullability
void setCheckNullability(boolean enabled)
-
isPreferUserTransaction
boolean isPreferUserTransaction()
-
isProcedureParameterNullPassingEnabled
boolean isProcedureParameterNullPassingEnabled()
-
isCollectionJoinSubqueryRewriteEnabled
boolean isCollectionJoinSubqueryRewriteEnabled()
-
isAllowOutOfTransactionUpdateOperations
boolean isAllowOutOfTransactionUpdateOperations()
-
isReleaseResourcesOnCloseEnabled
boolean isReleaseResourcesOnCloseEnabled()
-
getJdbcTimeZone
java.util.TimeZone getJdbcTimeZone()
-
isQueryParametersValidationEnabled
default boolean isQueryParametersValidationEnabled()
-
getCriteriaLiteralHandlingMode
default LiteralHandlingMode getCriteriaLiteralHandlingMode()
-
jdbcStyleParamsZeroBased
boolean jdbcStyleParamsZeroBased()
-
getJpaCompliance
JpaCompliance getJpaCompliance()
-
isFailOnPaginationOverCollectionFetchEnabled
boolean isFailOnPaginationOverCollectionFetchEnabled()
-
getImmutableEntityUpdateQueryHandlingMode
default ImmutableEntityUpdateQueryHandlingMode getImmutableEntityUpdateQueryHandlingMode()
-
inClauseParameterPaddingEnabled
default boolean inClauseParameterPaddingEnabled()
-
nativeExceptionHandling51Compliance
default boolean nativeExceptionHandling51Compliance()
-
isEnhancementAsProxyEnabled
default boolean isEnhancementAsProxyEnabled()
Can bytecode-enhanced entity classes be used as a "proxy"?
-
-