Class SessionFactoryOptionsBuilder
- All Implemented Interfaces:
SessionFactoryOptions,QueryEngineOptions
SessionFactoryOptions during SessionFactoryBuilder
processing.
The intention is that SessionFactoryBuilder internally creates and populates this builder, which
is then used to construct the SessionFactoryOptions as part of building the SessionFactory
from SessionFactoryBuilder.build().
-
Constructor Summary
ConstructorsConstructorDescriptionSessionFactoryOptionsBuilder(StandardServiceRegistry serviceRegistry, BootstrapContext context) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEntityNameResolvers(EntityNameResolver... entityNameResolvers) voidaddSessionFactoryObservers(SessionFactoryObserver... observers) voidallowDirectReferenceCacheEntries(boolean enabled) booleanvoidallowLazyInitializationOutsideTransaction(boolean enabled) voidallowOutOfTransactionUpdateOperations(boolean allow) voidapplyBeanManager(Object beanManager) voidapplyCacheRegionPrefix(String prefix) voidvoidapplyConnectionProviderDisablesAutoCommit(boolean providerDisablesAutoCommit) voidvoidvoidapplyDefaultBatchFetchSize(int size) voidapplyDefaultNullPrecedence(Nulls nullPrecedence) voidapplyDelayedEntityLoaderCreations(boolean delay) voidapplyEntityNotFoundDelegate(EntityNotFoundDelegate entityNotFoundDelegate) voidapplyInterceptor(Interceptor interceptor) voidapplyJdbcBatchSize(int size) voidapplyJdbcFetchSize(int size) voidapplyJsonFormatMapper(FormatMapper jsonFormatMapper) voidapplyMaximumFetchDepth(int depth) voidapplyMultiTenancy(boolean enabled) voidapplyQueryCacheLayout(CacheLayout queryCacheLayout) voidapplySessionFactoryName(String sessionFactoryName) voidapplySqlFunction(String registrationName, SqmFunctionDescriptor sqlFunction) voidapplySqmFunctionRegistry(SqmFunctionRegistry sqmFunctionRegistry) voidapplyStatelessInterceptor(Class<? extends Interceptor> statelessInterceptorClass) voidapplyStatelessInterceptorSupplier(Supplier<? extends Interceptor> statelessInterceptorSupplier) voidapplyStatementInspector(StatementInspector statementInspector) voidapplySubselectFetchEnabled(boolean subselectFetchEnabled) voidDeprecated, for removal: This API element is subject to removal in a future version.voidapplyTenantSchemaMapper(TenantSchemaMapper<?> mapper) voidvoidapplyValidatorFactory(Object validatorFactory) voidapplyXmlFormatMapper(FormatMapper xmlFormatMapper) booleanShould JPA entity lifecycle callbacks be processed by theEventEngineandCallbackRegistry?voidbooleanDo newly-obtained JDBC connections come with autocommit already disabled?voidenableAutoEvictCollectionCaches(boolean enabled) voidenableCollectionInDefaultFetchGroup(boolean enabled) voidenableCommentsSupport(boolean enabled) voidenabledStructuredCacheEntries(boolean enabled) voidenableGeneratedKeysSupport(boolean enabled) voidenableGeneratorNameScopeCompliance(boolean enabled) voidenableIdentifierRollbackSupport(boolean enabled) voidenableJpaCachingCompliance(boolean enabled) voidenableJpaCascadeCompliance(boolean enabled) voidenableJpaClosedCompliance(boolean enabled) voidenableJpaOrderByMappingCompliance(boolean enabled) voidenableJpaProxyCompliance(boolean enabled) voidenableJpaQueryCompliance(boolean enabled) voidenableJpaTransactionCompliance(boolean enabled) voidenableJtaTrackingByThread(boolean enabled) voidenableMinimalPuts(boolean enabled) voidenableNamedQueryCheckingOnStartup(boolean enabled) voidenableNullabilityChecking(boolean enabled) voidenableOrderingOfInserts(boolean enabled) voidenableOrderingOfUpdates(boolean enabled) voidenablePreferUserTransaction(boolean preferUserTransaction) voidenableQueryCacheSupport(boolean enabled) voidenableReleaseResourcesOnClose(boolean enable) Deprecated, for removal: This API element is subject to removal in a future version.voidenableScrollableResultSupport(boolean enabled) voidenableSecondLevelCacheSupport(boolean enabled) voidenableSessionAutoClosing(boolean autoClosingEnabled) voidenableSessionAutoFlushing(boolean flushBeforeCompletionEnabled) voidenableSessionFactoryNameAsJndiName(boolean isJndiName) voidenableStatisticsSupport(boolean enabled) A factory-specific prefix to be applied to all cache region names.getCacheRetrieveMode(Map<String, Object> properties) Determine the defaultCacheRetrieveMode, given the current session properties.getCacheStoreMode(Map<String, Object> properties) Determine the defaultCacheStoreMode, given the current session properties.Obtain a reference to the current tenant identifier resolver, if any, or returnnullis there is no resolver configured.A custom strategy for determining if an entity instance is dirty.Translator for transforming HQL (as an Antlr parse tree) into an SQM tree.User defined SQM functions available for use in HQL and Criteria.User supplied registry of SQM functions available for use in HQL and CriteriaContract for handling SQM trees representing insertion (INSERT) queries where the target of the mutation is a multi-table entity.Contract for handling SQM trees representing mutation (UPDATE or DELETE) queries where the target of the mutation is a multi-table entity.Factory for translators transforming an SQM tree into a different form.intThe default batch size for batch fetching in new sessions.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).The default lock scope and lock timeout.The default precedence of null values in sorted query results.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).Default properties for brand-new sessions.An array of custom entity name resolvers.Get the delegate for handling entity-not-found exception conditions.The default initialCacheModefor new sessions.The default initialFlushModefor new sessions.An interceptor instance shared between all sessions created by this factory.intThe default JDBC statement batch size for new sessions.The timezone to use when interacting with JDBC.The format mapper to use for serializing/deserializing JSON data.booleanintintintintintThe layout of entries in the query cache.intThe number ofQueryStatisticsentries that should be stored byStatistics.Deprecated.The service registry to use in building the factory.The name to be used for theSessionFactory.Observers for events raised by the factory.Supplier<? extends Interceptor> A statelessSupplierfor interceptor instances which are not shared between sessions created by this factory.The defaultStatementInspectorfor this factory.Deprecated.Obtain a reference to the current tenant schema mapper, which is used to set the schema to the schema belonging to the current tenant each time a connection is obtained.A factory for theTimestampsCacheused to track invalidation of cached query result sets.getUuid()Get the UUID unique to this SessionFactoryOptions.The format mapper to use for serializing/deserializing XML data.booleanbooleanbooleanbooleanbooleanShould Hibernate validate that non-optional attributes have non-null values?booleanbooleanShould explanatory comment text be added to the generated SQL?booleanbooleanbooleanDeprecated, for removal: This API element is subject to removal in a future version.booleanbooleanbooleanbooleanbooleanShould generated identifiers be reset after entity removal?booleanAre detached proxies and collections fetched in a temporary persistence context?booleanWas building of theSessionFactoryinitiated through JPA bootstrapping, or through Hibernate-native bootstrapping?booleanbooleanbooleanbooleanShould we avoid overwriting cache entries with identical entries?booleanIs there a multi-tenant connection provider configured?booleanAre named queries validated when the factory is created?booleanbooleanbooleanbooleanShould HQL integer division HQL should produce an integer on Oracle, MySQL, and MariaDB, where the/operator produces a non-integer.booleanbooleanShould native queries return JDBC datetime types instead of usingjava.timetypes.booleanbooleanbooleanIs the query cache enabled?booleanbooleanbooleanIs the second-level cache enabled?Is the session factory name also a JNDI name, indicating we should bind it into JNDI?booleanIs collection of statistics enabled by default for this factory?booleanAre second-level cache entries stored in a human-readable format.booleanIs subselect fetching enabled by default in new sessions?booleanbooleanControls whether Hibernate should try to map named parameter names specified in aProcedureCallorStoredProcedureQueryto named parameters in the JDBCCallableStatement.booleanWhether to use the legacy format for serializing/deserializing XML data.booleanresolveCustomSqmMultiTableInsertStrategy(EntityMappingType rootEntityDescriptor, RuntimeModelCreationContext creationContext) Contract for handling SQM trees representing insertion (INSERT) queries where the target of the mutation is a multi-table entity.resolveCustomSqmMultiTableMutationStrategy(EntityMappingType rootEntityDescriptor, RuntimeModelCreationContext creationContext) Contract for handling SQM trees representing mutation (UPDATE or DELETE) queries where the target of the mutation is a multi-table entity.voidsetCheckNullability(boolean enabled) Allows Bean Validation to disable null checking.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.boot.spi.SessionFactoryOptions
buildSessionEventListeners, getDefaultTenantIdentifierJavaType, isAllowRefreshDetachedEntity
-
Constructor Details
-
SessionFactoryOptionsBuilder
public SessionFactoryOptionsBuilder(StandardServiceRegistry serviceRegistry, BootstrapContext context)
-
-
Method Details
-
getUuid
Description copied from interface:SessionFactoryOptionsGet the UUID unique to this SessionFactoryOptions. Will be the same value available asSessionFactoryImplementor.getUuid().- Specified by:
getUuidin interfaceQueryEngineOptions- Specified by:
getUuidin interfaceSessionFactoryOptions- Returns:
- The UUID for this SessionFactory.
- See Also:
-
getServiceRegistry
Description copied from interface:SessionFactoryOptionsThe service registry to use in building the factory.- Specified by:
getServiceRegistryin interfaceSessionFactoryOptions- Returns:
- The service registry to use.
-
isJpaBootstrap
public boolean isJpaBootstrap()Description copied from interface:SessionFactoryOptionsWas building of theSessionFactoryinitiated through JPA bootstrapping, or through Hibernate-native bootstrapping?- Specified by:
isJpaBootstrapin interfaceSessionFactoryOptions- Returns:
trueindicates the SessionFactory was built through JPA bootstrapping;falseindicates it was built through native bootstrapping.
-
isJtaTransactionAccessEnabled
public boolean isJtaTransactionAccessEnabled()- Specified by:
isJtaTransactionAccessEnabledin interfaceSessionFactoryOptions- See Also:
-
isAllowOutOfTransactionUpdateOperations
public boolean isAllowOutOfTransactionUpdateOperations()- Specified by:
isAllowOutOfTransactionUpdateOperationsin interfaceSessionFactoryOptions- See Also:
-
isReleaseResourcesOnCloseEnabled
public boolean isReleaseResourcesOnCloseEnabled()- Specified by:
isReleaseResourcesOnCloseEnabledin interfaceSessionFactoryOptions- See Also:
-
getBeanManagerReference
- Specified by:
getBeanManagerReferencein interfaceSessionFactoryOptions- See Also:
-
getValidatorFactoryReference
- Specified by:
getValidatorFactoryReferencein interfaceSessionFactoryOptions- See Also:
-
getSessionFactoryName
Description copied from interface:SessionFactoryOptionsThe name to be used for theSessionFactory. This is used during in-VM serialization; seeSessionFactoryRegistry. May also be used as a JNDI name, depending on "hibernate.session_factory_jndi_name" and "hibernate.session_factory_name_is_jndi".- Specified by:
getSessionFactoryNamein interfaceQueryEngineOptions- Specified by:
getSessionFactoryNamein interfaceSessionFactoryOptions- Returns:
- The session factory name
- See Also:
-
isSessionFactoryNameAlsoJndiName
Description copied from interface:SessionFactoryOptionsIs the session factory name also a JNDI name, indicating we should bind it into JNDI?- Specified by:
isSessionFactoryNameAlsoJndiNamein interfaceSessionFactoryOptions- Returns:
trueif the SessionFactory name is also a JNDI name;falseotherwise.- See Also:
-
isFlushBeforeCompletionEnabled
public boolean isFlushBeforeCompletionEnabled()- Specified by:
isFlushBeforeCompletionEnabledin interfaceSessionFactoryOptions- See Also:
-
isAutoCloseSessionEnabled
public boolean isAutoCloseSessionEnabled()- Specified by:
isAutoCloseSessionEnabledin interfaceSessionFactoryOptions- See Also:
-
isStatisticsEnabled
public boolean isStatisticsEnabled()Description copied from interface:SessionFactoryOptionsIs collection of statistics enabled by default for this factory?- Specified by:
isStatisticsEnabledin interfaceSessionFactoryOptions- See Also:
-
getInterceptor
Description copied from interface:SessionFactoryOptionsAn interceptor instance shared between all sessions created by this factory. Such an interceptor must be thread-safe and may not hold state associated with any given session.- Specified by:
getInterceptorin interfaceSessionFactoryOptions- Returns:
- The interceptor instance to use factory-wide by default. May be
null. - See Also:
-
getStatelessInterceptorImplementorSupplier
Description copied from interface:SessionFactoryOptionsA statelessSupplierfor interceptor instances which are not shared between sessions created by this factory. This allows eachInterceptorinstances itself to hold state associated with its session.- Specified by:
getStatelessInterceptorImplementorSupplierin interfaceSessionFactoryOptions- Returns:
- The interceptor supplier to use by default. May be
null. - See Also:
-
getCustomHqlTranslator
Description copied from interface:QueryEngineOptionsTranslator for transforming HQL (as an Antlr parse tree) into an SQM tree.- Specified by:
getCustomHqlTranslatorin interfaceQueryEngineOptions- See Also:
-
getCustomSqmTranslatorFactory
Description copied from interface:QueryEngineOptionsFactory for translators transforming an SQM tree into a different form. For standard ORM implementations this will generally be some form of SQL tree.- Specified by:
getCustomSqmTranslatorFactoryin interfaceQueryEngineOptions- See Also:
-
getCustomSqmMultiTableMutationStrategy
Description copied from interface:QueryEngineOptionsContract for handling SQM trees representing mutation (UPDATE or DELETE) queries where the target of the mutation is a multi-table entity.- Specified by:
getCustomSqmMultiTableMutationStrategyin interfaceQueryEngineOptions- See Also:
-
getCustomSqmMultiTableInsertStrategy
Description copied from interface:QueryEngineOptionsContract for handling SQM trees representing insertion (INSERT) queries where the target of the mutation is a multi-table entity.- Specified by:
getCustomSqmMultiTableInsertStrategyin interfaceQueryEngineOptions- See Also:
-
resolveCustomSqmMultiTableMutationStrategy
public SqmMultiTableMutationStrategy resolveCustomSqmMultiTableMutationStrategy(EntityMappingType rootEntityDescriptor, RuntimeModelCreationContext creationContext) Description copied from interface:QueryEngineOptionsContract for handling SQM trees representing mutation (UPDATE or DELETE) queries where the target of the mutation is a multi-table entity.- Specified by:
resolveCustomSqmMultiTableMutationStrategyin interfaceQueryEngineOptions- See Also:
-
resolveCustomSqmMultiTableInsertStrategy
public SqmMultiTableInsertStrategy resolveCustomSqmMultiTableInsertStrategy(EntityMappingType rootEntityDescriptor, RuntimeModelCreationContext creationContext) Description copied from interface:QueryEngineOptionsContract for handling SQM trees representing insertion (INSERT) queries where the target of the mutation is a multi-table entity.- Specified by:
resolveCustomSqmMultiTableInsertStrategyin interfaceQueryEngineOptions- See Also:
-
isUseOfJdbcNamedParametersEnabled
public boolean isUseOfJdbcNamedParametersEnabled()Description copied from interface:SessionFactoryOptionsControls whether Hibernate should try to map named parameter names specified in aProcedureCallorStoredProcedureQueryto 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 tofalsesimply circumvents that check and always performs positional binding.- Specified by:
isUseOfJdbcNamedParametersEnabledin interfaceSessionFactoryOptions- Returns:
trueindicates we should try to useCallableStatementnamed parameters, if the Dialect says it is supported;falseindicates that we should never try to useCallableStatementnamed parameters, regardless of what the Dialect says.- See Also:
-
getCustomSqmFunctionRegistry
Description copied from interface:QueryEngineOptionsUser supplied registry of SQM functions available for use in HQL and CriteriaCan be used in conjunction with
QueryEngineOptions.getCustomSqlFunctionMap(), but generally one or the other will be used.- Specified by:
getCustomSqmFunctionRegistryin interfaceQueryEngineOptions
-
getStatementInspector
Description copied from interface:SessionFactoryOptionsThe defaultStatementInspectorfor this factory.- Specified by:
getStatementInspectorin interfaceSessionFactoryOptions- See Also:
-
getSessionFactoryObservers
Description copied from interface:SessionFactoryOptionsObservers for events raised by the factory.- Specified by:
getSessionFactoryObserversin interfaceSessionFactoryOptions- See Also:
-
getBaselineSessionEventsListenerBuilder
- Specified by:
getBaselineSessionEventsListenerBuilderin interfaceSessionFactoryOptions
-
isIdentifierRollbackEnabled
public boolean isIdentifierRollbackEnabled()Description copied from interface:SessionFactoryOptionsShould generated identifiers be reset after entity removal?- Specified by:
isIdentifierRollbackEnabledin interfaceSessionFactoryOptions- See Also:
-
isCheckNullability
public boolean isCheckNullability()Description copied from interface:SessionFactoryOptionsShould Hibernate validate that non-optional attributes have non-null values?- Specified by:
isCheckNullabilityin interfaceSessionFactoryOptions- See Also:
-
isInitializeLazyStateOutsideTransactionsEnabled
public boolean isInitializeLazyStateOutsideTransactionsEnabled()Description copied from interface:SessionFactoryOptionsAre detached proxies and collections fetched in a temporary persistence context?- Specified by:
isInitializeLazyStateOutsideTransactionsEnabledin interfaceSessionFactoryOptions- See Also:
-
getTempTableDdlTransactionHandling
Deprecated.Description copied from interface:SessionFactoryOptionsThis is unused and will be removed.- Specified by:
getTempTableDdlTransactionHandlingin interfaceSessionFactoryOptions
-
isDelayBatchFetchLoaderCreationsEnabled
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
isDelayBatchFetchLoaderCreationsEnabledin interfaceSessionFactoryOptions- See Also:
-
getDefaultBatchFetchSize
public int getDefaultBatchFetchSize()Description copied from interface:SessionFactoryOptionsThe default batch size for batch fetching in new sessions.- Specified by:
getDefaultBatchFetchSizein interfaceSessionFactoryOptions- See Also:
-
getMaximumFetchDepth
- Specified by:
getMaximumFetchDepthin interfaceSessionFactoryOptions- See Also:
-
isSubselectFetchEnabled
public boolean isSubselectFetchEnabled()Description copied from interface:SessionFactoryOptionsIs subselect fetching enabled by default in new sessions?- Specified by:
isSubselectFetchEnabledin interfaceSessionFactoryOptions- See Also:
-
getDefaultNullPrecedence
Description copied from interface:SessionFactoryOptionsThe default precedence of null values in sorted query results.- Specified by:
getDefaultNullPrecedencein interfaceSessionFactoryOptions- See Also:
-
isOrderUpdatesEnabled
public boolean isOrderUpdatesEnabled()- Specified by:
isOrderUpdatesEnabledin interfaceSessionFactoryOptions- See Also:
-
isOrderInsertsEnabled
public boolean isOrderInsertsEnabled()- Specified by:
isOrderInsertsEnabledin interfaceSessionFactoryOptions- See Also:
-
isMultiTenancyEnabled
public boolean isMultiTenancyEnabled()Description copied from interface:SessionFactoryOptionsIs there a multi-tenant connection provider configured?- Specified by:
isMultiTenancyEnabledin interfaceSessionFactoryOptions- See Also:
-
getTenantSchemaMapper
Description copied from interface:SessionFactoryOptionsObtain a reference to the current tenant schema mapper, which is used to set the schema to the schema belonging to the current tenant each time a connection is obtained.- Specified by:
getTenantSchemaMapperin interfaceSessionFactoryOptions- See Also:
-
getCurrentTenantIdentifierResolver
Description copied from interface:SessionFactoryOptionsObtain a reference to the current tenant identifier resolver, if any, or returnnullis there is no resolver configured.- Specified by:
getCurrentTenantIdentifierResolverin interfaceSessionFactoryOptions- See Also:
-
isJtaTrackByThread
public boolean isJtaTrackByThread()- Specified by:
isJtaTrackByThreadin interfaceSessionFactoryOptions- See Also:
-
isNamedQueryStartupCheckingEnabled
public boolean isNamedQueryStartupCheckingEnabled()Description copied from interface:SessionFactoryOptionsAre named queries validated when the factory is created?- Specified by:
isNamedQueryStartupCheckingEnabledin interfaceSessionFactoryOptions- See Also:
-
isSecondLevelCacheEnabled
public boolean isSecondLevelCacheEnabled()Description copied from interface:SessionFactoryOptionsIs the second-level cache enabled?- Specified by:
isSecondLevelCacheEnabledin interfaceSessionFactoryOptions- See Also:
-
isQueryCacheEnabled
public boolean isQueryCacheEnabled()Description copied from interface:SessionFactoryOptionsIs the query cache enabled?- Specified by:
isQueryCacheEnabledin interfaceSessionFactoryOptions- See Also:
-
getQueryCacheLayout
Description copied from interface:SessionFactoryOptionsThe layout of entries in the query cache.- Specified by:
getQueryCacheLayoutin interfaceSessionFactoryOptions- See Also:
-
getTimestampsCacheFactory
Description copied from interface:SessionFactoryOptionsA factory for theTimestampsCacheused to track invalidation of cached query result sets.- Specified by:
getTimestampsCacheFactoryin interfaceSessionFactoryOptions- See Also:
-
getCacheRegionPrefix
Description copied from interface:SessionFactoryOptionsA factory-specific prefix to be applied to all cache region names.- Specified by:
getCacheRegionPrefixin interfaceSessionFactoryOptions- See Also:
-
isMinimalPutsEnabled
public boolean isMinimalPutsEnabled()Description copied from interface:SessionFactoryOptionsShould we avoid overwriting cache entries with identical entries?This is useful if cache writes are much more expensive than cache reads.
- Specified by:
isMinimalPutsEnabledin interfaceSessionFactoryOptions- See Also:
-
isStructuredCacheEntriesEnabled
public boolean isStructuredCacheEntriesEnabled()Description copied from interface:SessionFactoryOptionsAre second-level cache entries stored in a human-readable format.- Specified by:
isStructuredCacheEntriesEnabledin interfaceSessionFactoryOptions- See Also:
-
isDirectReferenceCacheEntriesEnabled
public boolean isDirectReferenceCacheEntriesEnabled()- Specified by:
isDirectReferenceCacheEntriesEnabledin interfaceSessionFactoryOptions- See Also:
-
isAutoEvictCollectionCache
public boolean isAutoEvictCollectionCache()- Specified by:
isAutoEvictCollectionCachein interfaceSessionFactoryOptions- See Also:
-
getSchemaAutoTooling
Deprecated.- Specified by:
getSchemaAutoToolingin interfaceSessionFactoryOptions- See Also:
-
getJdbcBatchSize
public int getJdbcBatchSize()Description copied from interface:SessionFactoryOptionsThe default JDBC statement batch size for new sessions.- Specified by:
getJdbcBatchSizein interfaceSessionFactoryOptions- See Also:
-
isScrollableResultSetsEnabled
public boolean isScrollableResultSetsEnabled()- Specified by:
isScrollableResultSetsEnabledin interfaceSessionFactoryOptions- See Also:
-
isGetGeneratedKeysEnabled
public boolean isGetGeneratedKeysEnabled()- Specified by:
isGetGeneratedKeysEnabledin interfaceSessionFactoryOptions- See Also:
-
getJdbcFetchSize
- Specified by:
getJdbcFetchSizein interfaceSessionFactoryOptions- See Also:
-
getPhysicalConnectionHandlingMode
- Specified by:
getPhysicalConnectionHandlingModein interfaceSessionFactoryOptions- See Also:
-
setCheckNullability
public void setCheckNullability(boolean enabled) Description copied from interface:SessionFactoryOptionsAllows Bean Validation to disable null checking.- Specified by:
setCheckNullabilityin interfaceSessionFactoryOptions
-
doesConnectionProviderDisableAutoCommit
public boolean doesConnectionProviderDisableAutoCommit()Description copied from interface:SessionFactoryOptionsDo newly-obtained JDBC connections come with autocommit already disabled?- Specified by:
doesConnectionProviderDisableAutoCommitin interfaceSessionFactoryOptions- See Also:
-
isCommentsEnabled
public boolean isCommentsEnabled()Description copied from interface:SessionFactoryOptionsShould explanatory comment text be added to the generated SQL?- Specified by:
isCommentsEnabledin interfaceSessionFactoryOptions- See Also:
-
getCustomEntityDirtinessStrategy
Description copied from interface:SessionFactoryOptionsA custom strategy for determining if an entity instance is dirty.- Specified by:
getCustomEntityDirtinessStrategyin interfaceSessionFactoryOptions- See Also:
-
getEntityNameResolvers
Description copied from interface:SessionFactoryOptionsAn array of custom entity name resolvers.- Specified by:
getEntityNameResolversin interfaceSessionFactoryOptions- See Also:
-
getEntityNotFoundDelegate
Description copied from interface:SessionFactoryOptionsGet the delegate for handling entity-not-found exception conditions.Returns
StandardEntityNotFoundDelegateby default.- Specified by:
getEntityNotFoundDelegatein interfaceSessionFactoryOptions- Returns:
- The specific
EntityNotFoundDelegateto use, may benull - See Also:
-
getCustomSqlFunctionMap
Description copied from interface:QueryEngineOptionsUser defined SQM functions available for use in HQL and Criteria.Ultimately made available to the
SqmTranslatorFactoryfor use in translating an SQM tree.Can be used in conjunction with
QueryEngineOptions.getCustomSqmFunctionRegistry(), but generally one or the other will be used.- Specified by:
getCustomSqlFunctionMapin interfaceQueryEngineOptions
-
isPreferUserTransaction
public boolean isPreferUserTransaction()- Specified by:
isPreferUserTransactionin interfaceSessionFactoryOptions- See Also:
-
getJdbcTimeZone
Description copied from interface:SessionFactoryOptionsThe timezone to use when interacting with JDBC.- Specified by:
getJdbcTimeZonein interfaceSessionFactoryOptions- See Also:
-
getCriteriaValueHandlingMode
- Specified by:
getCriteriaValueHandlingModein interfaceQueryEngineOptions- See Also:
-
isCriteriaCopyTreeEnabled
public boolean isCriteriaCopyTreeEnabled()- Specified by:
isCriteriaCopyTreeEnabledin interfaceSessionFactoryOptions- See Also:
-
isCriteriaPlanCacheEnabled
public boolean isCriteriaPlanCacheEnabled()- Specified by:
isCriteriaPlanCacheEnabledin interfaceSessionFactoryOptions- See Also:
-
getNativeJdbcParametersIgnored
public boolean getNativeJdbcParametersIgnored()- Specified by:
getNativeJdbcParametersIgnoredin interfaceSessionFactoryOptions- See Also:
-
getImmutableEntityUpdateQueryHandlingMode
- Specified by:
getImmutableEntityUpdateQueryHandlingModein interfaceQueryEngineOptions- See Also:
-
allowImmutableEntityUpdate
public boolean allowImmutableEntityUpdate()- Specified by:
allowImmutableEntityUpdatein interfaceQueryEngineOptions- See Also:
-
getDefaultCatalog
Description copied from interface:SessionFactoryOptionsThe 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).- Specified by:
getDefaultCatalogin interfaceSessionFactoryOptions- Returns:
- The default catalog to use.
- See Also:
-
getDefaultSchema
Description copied from interface:SessionFactoryOptionsThe 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).- Specified by:
getDefaultSchemain interfaceSessionFactoryOptions- Returns:
- The default schema to use.
- See Also:
-
isFailOnPaginationOverCollectionFetchEnabled
public boolean isFailOnPaginationOverCollectionFetchEnabled()- Specified by:
isFailOnPaginationOverCollectionFetchEnabledin interfaceSessionFactoryOptions- See Also:
-
inClauseParameterPaddingEnabled
public boolean inClauseParameterPaddingEnabled()- Specified by:
inClauseParameterPaddingEnabledin interfaceSessionFactoryOptions- See Also:
-
isJsonFunctionsEnabled
public boolean isJsonFunctionsEnabled()- Specified by:
isJsonFunctionsEnabledin interfaceQueryEngineOptions- See Also:
-
isXmlFunctionsEnabled
public boolean isXmlFunctionsEnabled()- Specified by:
isXmlFunctionsEnabledin interfaceQueryEngineOptions- See Also:
-
isPortableIntegerDivisionEnabled
public boolean isPortableIntegerDivisionEnabled()Description copied from interface:QueryEngineOptionsShould HQL integer division HQL should produce an integer on Oracle, MySQL, and MariaDB, where the/operator produces a non-integer.- Specified by:
isPortableIntegerDivisionEnabledin interfaceQueryEngineOptions- See Also:
-
getJpaCompliance
- Specified by:
getJpaCompliancein interfaceQueryEngineOptions- Specified by:
getJpaCompliancein interfaceSessionFactoryOptions- See Also:
-
getQueryStatisticsMaxSize
public int getQueryStatisticsMaxSize()Description copied from interface:SessionFactoryOptionsThe number ofQueryStatisticsentries that should be stored byStatistics.- Specified by:
getQueryStatisticsMaxSizein interfaceSessionFactoryOptions- See Also:
-
areJPACallbacksEnabled
public boolean areJPACallbacksEnabled()Description copied from interface:SessionFactoryOptionsShould JPA entity lifecycle callbacks be processed by theEventEngineandCallbackRegistry?- Specified by:
areJPACallbacksEnabledin interfaceSessionFactoryOptions- See Also:
-
isCollectionsInDefaultFetchGroupEnabled
public boolean isCollectionsInDefaultFetchGroupEnabled()- Specified by:
isCollectionsInDefaultFetchGroupEnabledin interfaceSessionFactoryOptions
-
isUnownedAssociationTransientCheck
public boolean isUnownedAssociationTransientCheck()- Specified by:
isUnownedAssociationTransientCheckin interfaceSessionFactoryOptions- See Also:
-
getPreferredSqlTypeCodeForBoolean
public int getPreferredSqlTypeCodeForBoolean()- Specified by:
getPreferredSqlTypeCodeForBooleanin interfaceSessionFactoryOptions- See Also:
-
getPreferredSqlTypeCodeForDuration
public int getPreferredSqlTypeCodeForDuration()- Specified by:
getPreferredSqlTypeCodeForDurationin interfaceSessionFactoryOptions- See Also:
-
getPreferredSqlTypeCodeForUuid
public int getPreferredSqlTypeCodeForUuid()- Specified by:
getPreferredSqlTypeCodeForUuidin interfaceSessionFactoryOptions- See Also:
-
getPreferredSqlTypeCodeForInstant
public int getPreferredSqlTypeCodeForInstant()- Specified by:
getPreferredSqlTypeCodeForInstantin interfaceSessionFactoryOptions- See Also:
-
getPreferredSqlTypeCodeForArray
public int getPreferredSqlTypeCodeForArray()- Specified by:
getPreferredSqlTypeCodeForArrayin interfaceSessionFactoryOptions- See Also:
-
getDefaultTimeZoneStorageStrategy
- Specified by:
getDefaultTimeZoneStorageStrategyin interfaceSessionFactoryOptions- See Also:
-
isPreferJavaTimeJdbcTypesEnabled
public boolean isPreferJavaTimeJdbcTypesEnabled()- Specified by:
isPreferJavaTimeJdbcTypesEnabledin interfaceSessionFactoryOptions- See Also:
-
isPreferNativeEnumTypesEnabled
public boolean isPreferNativeEnumTypesEnabled()- Specified by:
isPreferNativeEnumTypesEnabledin interfaceSessionFactoryOptions- See Also:
-
getJsonFormatMapper
Description copied from interface:SessionFactoryOptionsThe format mapper to use for serializing/deserializing JSON data.- Specified by:
getJsonFormatMapperin interfaceSessionFactoryOptions- See Also:
-
getXmlFormatMapper
Description copied from interface:SessionFactoryOptionsThe format mapper to use for serializing/deserializing XML data.- Specified by:
getXmlFormatMapperin interfaceSessionFactoryOptions- See Also:
-
isXmlFormatMapperLegacyFormatEnabled
public boolean isXmlFormatMapperLegacyFormatEnabled()Description copied from interface:SessionFactoryOptionsWhether to use the legacy format for serializing/deserializing XML data.- Specified by:
isXmlFormatMapperLegacyFormatEnabledin interfaceSessionFactoryOptions- See Also:
-
isPassProcedureParameterNames
public boolean isPassProcedureParameterNames()- Specified by:
isPassProcedureParameterNamesin interfaceSessionFactoryOptions- See Also:
-
isPreferJdbcDatetimeTypesInNativeQueriesEnabled
public boolean isPreferJdbcDatetimeTypesInNativeQueriesEnabled()Description copied from interface:SessionFactoryOptionsShould native queries return JDBC datetime types instead of usingjava.timetypes.- Specified by:
isPreferJdbcDatetimeTypesInNativeQueriesEnabledin interfaceSessionFactoryOptions- See Also:
-
applyBeanManager
-
applyValidatorFactory
-
applyJsonFormatMapper
-
applyXmlFormatMapper
-
applySessionFactoryName
-
enableSessionFactoryNameAsJndiName
public void enableSessionFactoryNameAsJndiName(boolean isJndiName) -
enableSessionAutoClosing
public void enableSessionAutoClosing(boolean autoClosingEnabled) -
enableSessionAutoFlushing
public void enableSessionAutoFlushing(boolean flushBeforeCompletionEnabled) -
enableJtaTrackingByThread
public void enableJtaTrackingByThread(boolean enabled) -
enablePreferUserTransaction
public void enablePreferUserTransaction(boolean preferUserTransaction) -
enableStatisticsSupport
public void enableStatisticsSupport(boolean enabled) -
addSessionFactoryObservers
-
applyInterceptor
-
applyStatelessInterceptor
-
applyStatelessInterceptorSupplier
public void applyStatelessInterceptorSupplier(Supplier<? extends Interceptor> statelessInterceptorSupplier) -
applySqmFunctionRegistry
-
applyStatementInspector
-
applyCustomEntityDirtinessStrategy
-
addEntityNameResolvers
-
applyEntityNotFoundDelegate
-
enableIdentifierRollbackSupport
public void enableIdentifierRollbackSupport(boolean enabled) -
enableNullabilityChecking
public void enableNullabilityChecking(boolean enabled) -
allowLazyInitializationOutsideTransaction
public void allowLazyInitializationOutsideTransaction(boolean enabled) -
applyTempTableDdlTransactionHandling
@Deprecated(forRemoval=true) public void applyTempTableDdlTransactionHandling(TempTableDdlTransactionHandling handling) Deprecated, for removal: This API element is subject to removal in a future version. -
applyDelayedEntityLoaderCreations
public void applyDelayedEntityLoaderCreations(boolean delay) -
applyDefaultBatchFetchSize
public void applyDefaultBatchFetchSize(int size) -
applyMaximumFetchDepth
public void applyMaximumFetchDepth(int depth) -
applySubselectFetchEnabled
public void applySubselectFetchEnabled(boolean subselectFetchEnabled) -
applyDefaultNullPrecedence
-
enableOrderingOfInserts
public void enableOrderingOfInserts(boolean enabled) -
enableOrderingOfUpdates
public void enableOrderingOfUpdates(boolean enabled) -
applyMultiTenancy
public void applyMultiTenancy(boolean enabled) -
applyCurrentTenantIdentifierResolver
-
applyTenantSchemaMapper
-
enableNamedQueryCheckingOnStartup
public void enableNamedQueryCheckingOnStartup(boolean enabled) -
enableSecondLevelCacheSupport
public void enableSecondLevelCacheSupport(boolean enabled) -
enableQueryCacheSupport
public void enableQueryCacheSupport(boolean enabled) -
applyQueryCacheLayout
-
applyTimestampsCacheFactory
-
applyCacheRegionPrefix
-
enableMinimalPuts
public void enableMinimalPuts(boolean enabled) -
enabledStructuredCacheEntries
public void enabledStructuredCacheEntries(boolean enabled) -
allowDirectReferenceCacheEntries
public void allowDirectReferenceCacheEntries(boolean enabled) -
enableAutoEvictCollectionCaches
public void enableAutoEvictCollectionCaches(boolean enabled) -
applyJdbcBatchSize
public void applyJdbcBatchSize(int size) -
enableScrollableResultSupport
public void enableScrollableResultSupport(boolean enabled) -
enableGeneratedKeysSupport
public void enableGeneratedKeysSupport(boolean enabled) -
applyJdbcFetchSize
public void applyJdbcFetchSize(int size) -
applyConnectionHandlingMode
-
applyConnectionProviderDisablesAutoCommit
public void applyConnectionProviderDisablesAutoCommit(boolean providerDisablesAutoCommit) -
enableCommentsSupport
public void enableCommentsSupport(boolean enabled) -
applySqlFunction
-
allowOutOfTransactionUpdateOperations
public void allowOutOfTransactionUpdateOperations(boolean allow) -
enableReleaseResourcesOnClose
Deprecated, for removal: This API element is subject to removal in a future version. -
enableJpaQueryCompliance
public void enableJpaQueryCompliance(boolean enabled) -
enableJpaTransactionCompliance
public void enableJpaTransactionCompliance(boolean enabled) -
enableJpaCascadeCompliance
public void enableJpaCascadeCompliance(boolean enabled) -
enableJpaClosedCompliance
public void enableJpaClosedCompliance(boolean enabled) -
enableJpaProxyCompliance
public void enableJpaProxyCompliance(boolean enabled) -
enableJpaCachingCompliance
public void enableJpaCachingCompliance(boolean enabled) -
enableJpaOrderByMappingCompliance
public void enableJpaOrderByMappingCompliance(boolean enabled) -
enableGeneratorNameScopeCompliance
public void enableGeneratorNameScopeCompliance(boolean enabled) -
enableCollectionInDefaultFetchGroup
public void enableCollectionInDefaultFetchGroup(boolean enabled) -
disableJtaTransactionAccess
public void disableJtaTransactionAccess() -
buildOptions
-
getCacheStoreMode
Description copied from interface:SessionFactoryOptionsDetermine the defaultCacheStoreMode, given the current session properties.- Specified by:
getCacheStoreModein interfaceSessionFactoryOptions- Parameters:
properties- the Session properties- Returns:
- either the
CacheStoreModeas defined in the session-specific properties, or as defined in the properties shared across all sessions (the defaults).
-
getCacheRetrieveMode
Description copied from interface:SessionFactoryOptionsDetermine the defaultCacheRetrieveMode, given the current session properties.- Specified by:
getCacheRetrieveModein interfaceSessionFactoryOptions- Parameters:
properties- the Session properties- Returns:
- either the
CacheRetrieveModeas defined in the session-specific properties, or as defined in the properties shared across all sessions (the defaults).
-
getInitialSessionCacheMode
Description copied from interface:SessionFactoryOptionsThe default initialCacheModefor new sessions.- Specified by:
getInitialSessionCacheModein interfaceSessionFactoryOptions- See Also:
-
getInitialSessionFlushMode
Description copied from interface:SessionFactoryOptionsThe default initialFlushModefor new sessions.- Specified by:
getInitialSessionFlushModein interfaceSessionFactoryOptions- See Also:
-
getDefaultLockOptions
Description copied from interface:SessionFactoryOptionsThe default lock scope and lock timeout.- Specified by:
getDefaultLockOptionsin interfaceSessionFactoryOptions- See Also:
-
getDefaultSessionProperties
Description copied from interface:SessionFactoryOptionsDefault properties for brand-new sessions.- Specified by:
getDefaultSessionPropertiesin interfaceSessionFactoryOptions- See Also:
-