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
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()
- ApiNote:
- The value is generated as a
UUID
, but kept as a String.
-
getServiceRegistry
StandardServiceRegistry getServiceRegistry()
The service registry to use in building the factory.- Returns:
- The service registry to use.
-
getBeanManagerReference
Object getBeanManagerReference()
-
getValidatorFactoryReference
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
String getSessionFactoryName()
The name to be used for the SessionFactory. This is used 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 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 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
Integer getMaximumFetchDepth()
-
getDefaultNullPrecedence
NullPrecedence getDefaultNullPrecedence()
-
isOrderUpdatesEnabled
boolean isOrderUpdatesEnabled()
-
isOrderInsertsEnabled
boolean isOrderInsertsEnabled()
-
getMultiTenancyStrategy
MultiTenancyStrategy getMultiTenancyStrategy()
-
getCurrentTenantIdentifierResolver
CurrentTenantIdentifierResolver getCurrentTenantIdentifierResolver()
-
isJtaTrackByThread
boolean isJtaTrackByThread()
-
getQuerySubstitutions
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
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
@Deprecated boolean isWrapResultSetsEnabled()
Deprecated.(since 5.5) Scheduled for removal in 6.0 as ResultSet wrapping is no longer needed
-
isGetGeneratedKeysEnabled
boolean isGetGeneratedKeysEnabled()
-
getJdbcFetchSize
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
Map<String,SQLFunction> getCustomSqlFunctionMap()
-
setCheckNullability
void setCheckNullability(boolean enabled)
-
isPreferUserTransaction
boolean isPreferUserTransaction()
-
isProcedureParameterNullPassingEnabled
@Deprecated boolean isProcedureParameterNullPassingEnabled()
Deprecated.with no replacement. SeeAvailableSettings.PROCEDURE_NULL_PARAM_PASSING
for details
-
isCollectionJoinSubqueryRewriteEnabled
boolean isCollectionJoinSubqueryRewriteEnabled()
-
isAllowOutOfTransactionUpdateOperations
boolean isAllowOutOfTransactionUpdateOperations()
-
isReleaseResourcesOnCloseEnabled
boolean isReleaseResourcesOnCloseEnabled()
-
getJdbcTimeZone
TimeZone getJdbcTimeZone()
-
isQueryParametersValidationEnabled
default boolean isQueryParametersValidationEnabled()
-
getCriteriaLiteralHandlingMode
default LiteralHandlingMode getCriteriaLiteralHandlingMode()
-
jdbcStyleParamsZeroBased
boolean jdbcStyleParamsZeroBased()
-
getJpaCompliance
JpaCompliance getJpaCompliance()
-
isFailOnPaginationOverCollectionFetchEnabled
boolean isFailOnPaginationOverCollectionFetchEnabled()
-
getImmutableEntityUpdateQueryHandlingMode
default ImmutableEntityUpdateQueryHandlingMode getImmutableEntityUpdateQueryHandlingMode()
-
getDefaultCatalog
default String getDefaultCatalog()
The default catalog to use in generated SQL when a catalog wasn't specified in the mapping, neither explicitly nor implicitly (see the concept of implicit catalog in XML mapping).- Returns:
- The default catalog to use.
-
getDefaultSchema
default String getDefaultSchema()
The default schema to use in generated SQL when a catalog wasn't specified in the mapping, neither explicitly nor implicitly (see the concept of implicit schema in XML mapping).- Returns:
- The default schema to use.
-
inClauseParameterPaddingEnabled
default boolean inClauseParameterPaddingEnabled()
-
nativeExceptionHandling51Compliance
default boolean nativeExceptionHandling51Compliance()
-
getQueryStatisticsMaxSize
default int getQueryStatisticsMaxSize()
-
isPostInsertIdentifierDelayableEnabled
@Deprecated default boolean isPostInsertIdentifierDelayableEnabled()
Deprecated.Since 5.4.1, this is no longer used.
-
areJPACallbacksEnabled
default boolean areJPACallbacksEnabled()
-
isEnhancementAsProxyEnabled
@Deprecated default boolean isEnhancementAsProxyEnabled()
Deprecated.(since 5.5) use of enhanced proxies is always enabledCan bytecode-enhanced entity classes be used as a "proxy"?
-
isCollectionsInDefaultFetchGroupEnabled
default boolean isCollectionsInDefaultFetchGroupEnabled()
-
isOmitJoinOfSuperclassTablesEnabled
boolean isOmitJoinOfSuperclassTablesEnabled()
-
-