Class AbstractDelegatingSessionFactoryOptions
- java.lang.Object
-
- org.hibernate.boot.spi.AbstractDelegatingSessionFactoryOptions
-
- All Implemented Interfaces:
SessionFactoryOptions,QueryEngineOptions
public class AbstractDelegatingSessionFactoryOptions extends Object implements SessionFactoryOptions
Convenience base class for custom implementations ofSessionFactoryOptionsusing delegation.- Implementation Note:
- Declared non-abstract to ensure that all
SessionFactoryOptionsmethods have at least a default implementation.
-
-
Constructor Summary
Constructors Constructor Description AbstractDelegatingSessionFactoryOptions(SessionFactoryOptions delegate)
-
Method Summary
-
-
-
Constructor Detail
-
AbstractDelegatingSessionFactoryOptions
public AbstractDelegatingSessionFactoryOptions(SessionFactoryOptions delegate)
-
-
Method Detail
-
delegate
protected SessionFactoryOptions delegate()
-
getUuid
public String getUuid()
Description copied from interface:SessionFactoryOptionsGet the UUID unique to this SessionFactoryOptions. Will be the same value available asSessionFactoryImplementor.getUuid().- Specified by:
getUuidin interfaceSessionFactoryOptions- Returns:
- The UUID for this SessionFactory.
- See Also:
SessionFactoryRegistry.getSessionFactory(java.lang.String),SessionFactoryImplementor.getUuid()
-
getServiceRegistry
public StandardServiceRegistry 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 the SessionFactory initiated through JPA bootstrapping, or through Hibernate's 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
-
isAllowRefreshDetachedEntity
public boolean isAllowRefreshDetachedEntity()
- Specified by:
isAllowRefreshDetachedEntityin interfaceSessionFactoryOptions
-
getBeanManagerReference
public Object getBeanManagerReference()
- Specified by:
getBeanManagerReferencein interfaceSessionFactoryOptions
-
getValidatorFactoryReference
public Object getValidatorFactoryReference()
- Specified by:
getValidatorFactoryReferencein interfaceSessionFactoryOptions
-
getSessionFactoryName
public String getSessionFactoryName()
Description copied from interface:SessionFactoryOptionsThe name to be used for the SessionFactory. This is used both in:- in-VM serialization
- JNDI binding, depending on
SessionFactoryOptions.isSessionFactoryNameAlsoJndiName()
- Specified by:
getSessionFactoryNamein interfaceSessionFactoryOptions- Returns:
- The SessionFactory name
-
isSessionFactoryNameAlsoJndiName
public boolean isSessionFactoryNameAlsoJndiName()
Description copied from interface:SessionFactoryOptionsIs theSesssionFactory namealso 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.
-
isFlushBeforeCompletionEnabled
public boolean isFlushBeforeCompletionEnabled()
- Specified by:
isFlushBeforeCompletionEnabledin interfaceSessionFactoryOptions
-
isAutoCloseSessionEnabled
public boolean isAutoCloseSessionEnabled()
- Specified by:
isAutoCloseSessionEnabledin interfaceSessionFactoryOptions
-
isStatisticsEnabled
public boolean isStatisticsEnabled()
- Specified by:
isStatisticsEnabledin interfaceSessionFactoryOptions
-
getInterceptor
public Interceptor getInterceptor()
Description copied from interface:SessionFactoryOptionsGet the interceptor to use by default for all sessions opened from this factory.- Specified by:
getInterceptorin interfaceSessionFactoryOptions- Returns:
- The interceptor to use factory wide. May be
null
-
getCustomSqmMultiTableMutationStrategy
public SqmMultiTableMutationStrategy 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
-
getCustomSqmMultiTableInsertStrategy
public SqmMultiTableInsertStrategy 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
-
getStatementInspector
public StatementInspector getStatementInspector()
- Specified by:
getStatementInspectorin interfaceSessionFactoryOptions
-
getSessionFactoryObservers
public SessionFactoryObserver[] getSessionFactoryObservers()
- Specified by:
getSessionFactoryObserversin interfaceSessionFactoryOptions
-
getBaselineSessionEventsListenerBuilder
public BaselineSessionEventsListenerBuilder getBaselineSessionEventsListenerBuilder()
- Specified by:
getBaselineSessionEventsListenerBuilderin interfaceSessionFactoryOptions
-
isIdentifierRollbackEnabled
public boolean isIdentifierRollbackEnabled()
- Specified by:
isIdentifierRollbackEnabledin interfaceSessionFactoryOptions
-
isCheckNullability
public boolean isCheckNullability()
- Specified by:
isCheckNullabilityin interfaceSessionFactoryOptions
-
isInitializeLazyStateOutsideTransactionsEnabled
public boolean isInitializeLazyStateOutsideTransactionsEnabled()
- Specified by:
isInitializeLazyStateOutsideTransactionsEnabledin interfaceSessionFactoryOptions
-
getTempTableDdlTransactionHandling
public TempTableDdlTransactionHandling getTempTableDdlTransactionHandling()
- Specified by:
getTempTableDdlTransactionHandlingin interfaceSessionFactoryOptions
-
getBatchFetchStyle
public BatchFetchStyle getBatchFetchStyle()
- Specified by:
getBatchFetchStylein interfaceSessionFactoryOptions
-
isDelayBatchFetchLoaderCreationsEnabled
public boolean isDelayBatchFetchLoaderCreationsEnabled()
- Specified by:
isDelayBatchFetchLoaderCreationsEnabledin interfaceSessionFactoryOptions
-
getDefaultBatchFetchSize
public int getDefaultBatchFetchSize()
- Specified by:
getDefaultBatchFetchSizein interfaceSessionFactoryOptions
-
getMaximumFetchDepth
public Integer getMaximumFetchDepth()
- Specified by:
getMaximumFetchDepthin interfaceSessionFactoryOptions
-
getDefaultNullPrecedence
public NullPrecedence getDefaultNullPrecedence()
- Specified by:
getDefaultNullPrecedencein interfaceSessionFactoryOptions
-
isOrderUpdatesEnabled
public boolean isOrderUpdatesEnabled()
- Specified by:
isOrderUpdatesEnabledin interfaceSessionFactoryOptions
-
isOrderInsertsEnabled
public boolean isOrderInsertsEnabled()
- Specified by:
isOrderInsertsEnabledin interfaceSessionFactoryOptions
-
isMultiTenancyEnabled
public boolean isMultiTenancyEnabled()
- Specified by:
isMultiTenancyEnabledin interfaceSessionFactoryOptions
-
getCurrentTenantIdentifierResolver
public CurrentTenantIdentifierResolver getCurrentTenantIdentifierResolver()
- Specified by:
getCurrentTenantIdentifierResolverin interfaceSessionFactoryOptions
-
isJtaTrackByThread
public boolean isJtaTrackByThread()
- Specified by:
isJtaTrackByThreadin interfaceSessionFactoryOptions
-
isNamedQueryStartupCheckingEnabled
public boolean isNamedQueryStartupCheckingEnabled()
- Specified by:
isNamedQueryStartupCheckingEnabledin interfaceSessionFactoryOptions
-
isAllowOutOfTransactionUpdateOperations
public boolean isAllowOutOfTransactionUpdateOperations()
- Specified by:
isAllowOutOfTransactionUpdateOperationsin interfaceSessionFactoryOptions
-
isReleaseResourcesOnCloseEnabled
public boolean isReleaseResourcesOnCloseEnabled()
- Specified by:
isReleaseResourcesOnCloseEnabledin interfaceSessionFactoryOptions
-
isSecondLevelCacheEnabled
public boolean isSecondLevelCacheEnabled()
- Specified by:
isSecondLevelCacheEnabledin interfaceSessionFactoryOptions
-
isQueryCacheEnabled
public boolean isQueryCacheEnabled()
- Specified by:
isQueryCacheEnabledin interfaceSessionFactoryOptions
-
getTimestampsCacheFactory
public TimestampsCacheFactory getTimestampsCacheFactory()
- Specified by:
getTimestampsCacheFactoryin interfaceSessionFactoryOptions
-
getCacheRegionPrefix
public String getCacheRegionPrefix()
- Specified by:
getCacheRegionPrefixin interfaceSessionFactoryOptions
-
isMinimalPutsEnabled
public boolean isMinimalPutsEnabled()
- Specified by:
isMinimalPutsEnabledin interfaceSessionFactoryOptions
-
isStructuredCacheEntriesEnabled
public boolean isStructuredCacheEntriesEnabled()
- Specified by:
isStructuredCacheEntriesEnabledin interfaceSessionFactoryOptions
-
isDirectReferenceCacheEntriesEnabled
public boolean isDirectReferenceCacheEntriesEnabled()
- Specified by:
isDirectReferenceCacheEntriesEnabledin interfaceSessionFactoryOptions
-
isAutoEvictCollectionCache
public boolean isAutoEvictCollectionCache()
- Specified by:
isAutoEvictCollectionCachein interfaceSessionFactoryOptions
-
getSchemaAutoTooling
public SchemaAutoTooling getSchemaAutoTooling()
- Specified by:
getSchemaAutoToolingin interfaceSessionFactoryOptions
-
getJdbcBatchSize
public int getJdbcBatchSize()
- Specified by:
getJdbcBatchSizein interfaceSessionFactoryOptions
-
isJdbcBatchVersionedData
public boolean isJdbcBatchVersionedData()
- Specified by:
isJdbcBatchVersionedDatain interfaceSessionFactoryOptions
-
isScrollableResultSetsEnabled
public boolean isScrollableResultSetsEnabled()
- Specified by:
isScrollableResultSetsEnabledin interfaceSessionFactoryOptions
-
isGetGeneratedKeysEnabled
public boolean isGetGeneratedKeysEnabled()
- Specified by:
isGetGeneratedKeysEnabledin interfaceSessionFactoryOptions
-
getJdbcFetchSize
public Integer getJdbcFetchSize()
- Specified by:
getJdbcFetchSizein interfaceSessionFactoryOptions
-
getPhysicalConnectionHandlingMode
public PhysicalConnectionHandlingMode getPhysicalConnectionHandlingMode()
- Specified by:
getPhysicalConnectionHandlingModein interfaceSessionFactoryOptions
-
doesConnectionProviderDisableAutoCommit
public boolean doesConnectionProviderDisableAutoCommit()
- Specified by:
doesConnectionProviderDisableAutoCommitin interfaceSessionFactoryOptions
-
isCommentsEnabled
public boolean isCommentsEnabled()
- Specified by:
isCommentsEnabledin interfaceSessionFactoryOptions
-
getCustomEntityDirtinessStrategy
public CustomEntityDirtinessStrategy getCustomEntityDirtinessStrategy()
- Specified by:
getCustomEntityDirtinessStrategyin interfaceSessionFactoryOptions
-
getEntityNameResolvers
public EntityNameResolver[] getEntityNameResolvers()
- Specified by:
getEntityNameResolversin interfaceSessionFactoryOptions
-
getEntityNotFoundDelegate
public EntityNotFoundDelegate getEntityNotFoundDelegate()
Description copied from interface:SessionFactoryOptionsGet the delegate for handling entity-not-found exception conditions.- Specified by:
getEntityNotFoundDelegatein interfaceSessionFactoryOptions- Returns:
- The specific EntityNotFoundDelegate to use, May be
null
-
getCustomSqlFunctionMap
public Map<String,SqmFunctionDescriptor> 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
-
setCheckNullability
public void setCheckNullability(boolean enabled)
- Specified by:
setCheckNullabilityin interfaceSessionFactoryOptions
-
isPreferUserTransaction
public boolean isPreferUserTransaction()
- Specified by:
isPreferUserTransactionin interfaceSessionFactoryOptions
-
getStatelessInterceptorImplementorSupplier
public Supplier<? extends Interceptor> getStatelessInterceptorImplementorSupplier()
Description copied from interface:SessionFactoryOptionsGet the interceptor to use by default for all sessions opened from this factory.- Specified by:
getStatelessInterceptorImplementorSupplierin interfaceSessionFactoryOptions- Returns:
- The interceptor to use factory wide. May be
null
-
getCustomHqlTranslator
public HqlTranslator getCustomHqlTranslator()
Description copied from interface:QueryEngineOptionsTranslator for transforming HQL (as an Antlr parse tree) into an SQM tree.- Specified by:
getCustomHqlTranslatorin interfaceQueryEngineOptions- See Also:
org.hibernate.query.hql
-
getCustomSqmTranslatorFactory
public SqmTranslatorFactory 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:
org.hibernate.sql.ast.tree
-
getJdbcTimeZone
public TimeZone getJdbcTimeZone()
- Specified by:
getJdbcTimeZonein interfaceSessionFactoryOptions
-
getCriteriaValueHandlingMode
public ValueHandlingMode getCriteriaValueHandlingMode()
- Specified by:
getCriteriaValueHandlingModein interfaceQueryEngineOptions- Specified by:
getCriteriaValueHandlingModein interfaceSessionFactoryOptions- See Also:
AvailableSettings.CRITERIA_VALUE_HANDLING_MODE
-
isCriteriaCopyTreeEnabled
public boolean isCriteriaCopyTreeEnabled()
- Specified by:
isCriteriaCopyTreeEnabledin interfaceSessionFactoryOptions- See Also:
AvailableSettings.CRITERIA_COPY_TREE
-
getJpaCompliance
public JpaCompliance getJpaCompliance()
- Specified by:
getJpaCompliancein interfaceQueryEngineOptions- Specified by:
getJpaCompliancein interfaceSessionFactoryOptions
-
isFailOnPaginationOverCollectionFetchEnabled
public boolean isFailOnPaginationOverCollectionFetchEnabled()
- Specified by:
isFailOnPaginationOverCollectionFetchEnabledin interfaceSessionFactoryOptions
-
getImmutableEntityUpdateQueryHandlingMode
public ImmutableEntityUpdateQueryHandlingMode getImmutableEntityUpdateQueryHandlingMode()
- Specified by:
getImmutableEntityUpdateQueryHandlingModein interfaceSessionFactoryOptions
-
getDefaultCatalog
public String 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.
-
getDefaultSchema
public String 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.
-
inClauseParameterPaddingEnabled
public boolean inClauseParameterPaddingEnabled()
- Specified by:
inClauseParameterPaddingEnabledin interfaceSessionFactoryOptions
-
getQueryStatisticsMaxSize
public int getQueryStatisticsMaxSize()
- Specified by:
getQueryStatisticsMaxSizein interfaceSessionFactoryOptions
-
areJPACallbacksEnabled
public boolean areJPACallbacksEnabled()
- Specified by:
areJPACallbacksEnabledin interfaceSessionFactoryOptions
-
isCollectionsInDefaultFetchGroupEnabled
public boolean isCollectionsInDefaultFetchGroupEnabled()
- Specified by:
isCollectionsInDefaultFetchGroupEnabledin interfaceSessionFactoryOptions
-
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:
AvailableSettings.CALLABLE_NAMED_PARAMS_ENABLED
-
getCustomSqmFunctionRegistry
public SqmFunctionRegistry 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
-
getPreferredSqlTypeCodeForBoolean
public int getPreferredSqlTypeCodeForBoolean()
- Specified by:
getPreferredSqlTypeCodeForBooleanin interfaceSessionFactoryOptions
-
getPreferredSqlTypeCodeForDuration
public int getPreferredSqlTypeCodeForDuration()
- Specified by:
getPreferredSqlTypeCodeForDurationin interfaceSessionFactoryOptions
-
getPreferredSqlTypeCodeForUuid
public int getPreferredSqlTypeCodeForUuid()
- Specified by:
getPreferredSqlTypeCodeForUuidin interfaceSessionFactoryOptions
-
getPreferredSqlTypeCodeForInstant
public int getPreferredSqlTypeCodeForInstant()
- Specified by:
getPreferredSqlTypeCodeForInstantin interfaceSessionFactoryOptions
-
getPreferredSqlTypeCodeForArray
public int getPreferredSqlTypeCodeForArray()
- Specified by:
getPreferredSqlTypeCodeForArrayin interfaceSessionFactoryOptions
-
getDefaultTimeZoneStorageStrategy
public TimeZoneStorageStrategy getDefaultTimeZoneStorageStrategy()
- Specified by:
getDefaultTimeZoneStorageStrategyin interfaceSessionFactoryOptions
-
getJsonFormatMapper
public FormatMapper getJsonFormatMapper()
Description copied from interface:SessionFactoryOptionsThe format mapper to use for serializing/deserializing JSON data.- Specified by:
getJsonFormatMapperin interfaceSessionFactoryOptions
-
getXmlFormatMapper
public FormatMapper getXmlFormatMapper()
Description copied from interface:SessionFactoryOptionsThe format mapper to use for serializing/deserializing XML data.- Specified by:
getXmlFormatMapperin interfaceSessionFactoryOptions
-
-