Package org.hibernate.boot.spi
Interface SessionFactoryOptions
-
- All Superinterfaces:
QueryEngineOptions
- All Known Implementing Classes:
AbstractDelegatingSessionFactoryOptions
,MockSessionFactory
,ProcessorSessionFactory
,SessionFactoryOptionsBuilder
public interface SessionFactoryOptions extends QueryEngineOptions
Aggregator of special options used to build theSessionFactory
.- Since:
- 5.0
-
-
Method Summary
-
Methods inherited from interface org.hibernate.query.spi.QueryEngineOptions
getCustomHqlTranslator, getCustomSqlFunctionMap, getCustomSqmFunctionRegistry, getCustomSqmMultiTableInsertStrategy, getCustomSqmMultiTableMutationStrategy, getCustomSqmTranslatorFactory
-
-
-
-
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()
- API Note:
- 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
-
getStatelessInterceptorImplementorSupplier
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()
-
isCheckNullability
boolean isCheckNullability()
-
isInitializeLazyStateOutsideTransactionsEnabled
boolean isInitializeLazyStateOutsideTransactionsEnabled()
-
getTempTableDdlTransactionHandling
TempTableDdlTransactionHandling getTempTableDdlTransactionHandling()
-
getBatchFetchStyle
@Deprecated(since="6.0") BatchFetchStyle getBatchFetchStyle()
Deprecated.: No longer used internally
-
isDelayBatchFetchLoaderCreationsEnabled
boolean isDelayBatchFetchLoaderCreationsEnabled()
-
getDefaultBatchFetchSize
int getDefaultBatchFetchSize()
-
getMaximumFetchDepth
Integer getMaximumFetchDepth()
-
isSubselectFetchEnabled
boolean isSubselectFetchEnabled()
-
getDefaultNullPrecedence
NullPrecedence getDefaultNullPrecedence()
-
isOrderUpdatesEnabled
boolean isOrderUpdatesEnabled()
-
isOrderInsertsEnabled
boolean isOrderInsertsEnabled()
-
isMultiTenancyEnabled
boolean isMultiTenancyEnabled()
-
getCurrentTenantIdentifierResolver
CurrentTenantIdentifierResolver<Object> getCurrentTenantIdentifierResolver()
-
isJtaTrackByThread
boolean isJtaTrackByThread()
-
isNamedQueryStartupCheckingEnabled
boolean isNamedQueryStartupCheckingEnabled()
-
isSecondLevelCacheEnabled
boolean isSecondLevelCacheEnabled()
-
isQueryCacheEnabled
boolean isQueryCacheEnabled()
-
getQueryCacheLayout
@Incubating CacheLayout getQueryCacheLayout()
-
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()
-
isGetGeneratedKeysEnabled
boolean isGetGeneratedKeysEnabled()
-
getJdbcFetchSize
Integer getJdbcFetchSize()
-
getPhysicalConnectionHandlingMode
PhysicalConnectionHandlingMode getPhysicalConnectionHandlingMode()
-
doesConnectionProviderDisableAutoCommit
default boolean doesConnectionProviderDisableAutoCommit()
-
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
-
setCheckNullability
void setCheckNullability(boolean enabled)
-
isPreferUserTransaction
boolean isPreferUserTransaction()
-
isAllowOutOfTransactionUpdateOperations
boolean isAllowOutOfTransactionUpdateOperations()
-
isReleaseResourcesOnCloseEnabled
boolean isReleaseResourcesOnCloseEnabled()
-
getJdbcTimeZone
TimeZone getJdbcTimeZone()
-
getCriteriaValueHandlingMode
default ValueHandlingMode getCriteriaValueHandlingMode()
- Specified by:
getCriteriaValueHandlingMode
in interfaceQueryEngineOptions
- See Also:
QuerySettings.CRITERIA_VALUE_HANDLING_MODE
-
isCriteriaCopyTreeEnabled
default boolean isCriteriaCopyTreeEnabled()
- See Also:
QuerySettings.CRITERIA_COPY_TREE
-
getNativeJdbcParametersIgnored
default boolean getNativeJdbcParametersIgnored()
-
getJpaCompliance
JpaCompliance getJpaCompliance()
- Specified by:
getJpaCompliance
in interfaceQueryEngineOptions
-
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()
-
isPortableIntegerDivisionEnabled
default boolean isPortableIntegerDivisionEnabled()
- Specified by:
isPortableIntegerDivisionEnabled
in interfaceQueryEngineOptions
- See Also:
QuerySettings.PORTABLE_INTEGER_DIVISION
-
getQueryStatisticsMaxSize
default int getQueryStatisticsMaxSize()
-
areJPACallbacksEnabled
default boolean areJPACallbacksEnabled()
-
isUseOfJdbcNamedParametersEnabled
boolean isUseOfJdbcNamedParametersEnabled()
Controls whether Hibernate should try to map named parameter names specified in aProcedureCall
orStoredProcedureQuery
to named parameters in the JDBCCallableStatement
.As JPA is defined, the use of named parameters is essentially of dubious value since by spec the parameters have to be defined in the order they are defined in the procedure/function declaration - we can always bind them positionally. The whole idea of named parameters for CallableStatement is the ability to bind these in any order, but since we unequivocally know the order anyway binding them via name really gains nothing.
If this is
true
, we still need to make sure the Dialect supports named binding. Setting this tofalse
simply circumvents that check and always performs positional binding.- Returns:
true
indicates we should try to useCallableStatement
named parameters, if the Dialect says it is supported;false
indicates that we should never try to useCallableStatement
named parameters, regardless of what the Dialect says.- See Also:
QuerySettings.CALLABLE_NAMED_PARAMS_ENABLED
-
isCollectionsInDefaultFetchGroupEnabled
default boolean isCollectionsInDefaultFetchGroupEnabled()
-
isUnownedAssociationTransientCheck
boolean isUnownedAssociationTransientCheck()
-
getPreferredSqlTypeCodeForBoolean
@Incubating int getPreferredSqlTypeCodeForBoolean()
-
getPreferredSqlTypeCodeForDuration
@Incubating int getPreferredSqlTypeCodeForDuration()
-
getPreferredSqlTypeCodeForUuid
@Incubating int getPreferredSqlTypeCodeForUuid()
-
getPreferredSqlTypeCodeForInstant
@Incubating int getPreferredSqlTypeCodeForInstant()
-
getPreferredSqlTypeCodeForArray
@Incubating int getPreferredSqlTypeCodeForArray()
-
getDefaultTimeZoneStorageStrategy
@Incubating TimeZoneStorageStrategy getDefaultTimeZoneStorageStrategy()
-
isPreferJavaTimeJdbcTypesEnabled
boolean isPreferJavaTimeJdbcTypesEnabled()
-
isPreferNativeEnumTypesEnabled
boolean isPreferNativeEnumTypesEnabled()
-
getJsonFormatMapper
@Incubating FormatMapper getJsonFormatMapper()
The format mapper to use for serializing/deserializing JSON data.- Since:
- 6.0
-
getXmlFormatMapper
@Incubating FormatMapper getXmlFormatMapper()
The format mapper to use for serializing/deserializing XML data.- Since:
- 6.0.1
-
getDefaultTenantIdentifierJavaType
@Incubating default JavaType<Object> getDefaultTenantIdentifierJavaType()
The default tenant identifier java type to use, in case no explicit tenant identifier property is defined.- Since:
- 6.4
-
isPassProcedureParameterNames
boolean isPassProcedureParameterNames()
-
-