Top Description Fields Constructors Methods
org.hibernate.boot.spi

public abstract Class AbstractDelegatingSessionFactoryBuilder<T extends org.hibernate.boot.SessionFactoryBuilder>

extends Object
implements SessionFactoryBuilder
Class Inheritance
All Implemented Interfaces
org.hibernate.boot.SessionFactoryBuilder
Known Direct Subclasses
org.hibernate.boot.spi.AbstractDelegatingSessionFactoryBuilderImplementor
Type Parameters
<T>
The type of a specific sub-class; Allows sub-classes to narrow down the return-type of the contract methods to a specialization of SessionFactoryBuilder
Imports
java.util.Map, java.util.function.Supplier, org.hibernate.ConnectionReleaseMode, .CustomEntityDirtinessStrategy, .EntityMode, .EntityNameResolver, .Interceptor, .MultiTenancyStrategy, .NullPrecedence, .SessionFactory, .SessionFactoryObserver, org.hibernate.boot.SessionFactoryBuilder, .TempTableDdlTransactionHandling, org.hibernate.cache.spi.TimestampsCacheFactory, org.hibernate.context.spi.CurrentTenantIdentifierResolver, org.hibernate.dialect.function.SQLFunction, org.hibernate.hql.spi.id.MultiTableBulkIdStrategy, org.hibernate.loader.BatchFetchStyle, org.hibernate.proxy.EntityNotFoundDelegate, org.hibernate.resource.jdbc.spi.PhysicalConnectionHandlingMode, .StatementInspector, org.hibernate.tuple.entity.EntityTuplizer, .EntityTuplizerFactory

Convenience base class for custom implementors of SessionFactoryBuilder, using delegation
Authors
Steve Ebersole, Gunnar Morling, Guillaume Smet

Field Summary

Modifier and TypeField and Description
private final SessionFactoryBuilder

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public T
addEntityNameResolver(EntityNameResolver...
The entityNameResolvers to add
entityNameResolvers
)

Implements org.hibernate.boot.SessionFactoryBuilder.addEntityNameResolver.

Specifies one or more entity name resolvers to be applied to the SessionFactory (see the org.hibernate.EntityNameResolver contract for more information..
public T
addSessionFactoryObservers(SessionFactoryObserver...
The observers to add
observers
)

Implements org.hibernate.boot.SessionFactoryBuilder.addSessionFactoryObservers.

Specifies one or more observers to be applied to the SessionFactory.
public T
public T
applyAutoClosing(boolean
true indicates they should be auto-closed; false indicates not.
enabled
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyAutoClosing.

Applies whether Sessions should be automatically closed at the end of the transaction.
public T
applyAutoFlushing(boolean
true indicates they should be auto-flushed; false indicates not.
enabled
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyAutoFlushing.

Applies whether Sessions should be automatically flushed at the end of the transaction.
public T
applyAutomaticEvictionOfCollectionCaches(boolean
true indicates that these collection caches should be evicted automatically.
enabled
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyAutomaticEvictionOfCollectionCaches.

When using bi-directional many-to-one associations and caching the one-to-many side it is expected that both sides of the association are managed (actually that is true of all bi-directional associations).
public T
applyBatchFetchStyle(BatchFetchStyle
The style to use
style
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyBatchFetchStyle.

What style of batching should be used?
public T
applyBeanManager(Object
The CDI BeanManager to use
beanManager
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyBeanManager.

Apply a CDI BeanManager to the SessionFactory being built.
public T
applyCacheRegionPrefix(String
The prefix.
prefix
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyCacheRegionPrefix.

Apply a prefix to prepended to all cache region names for this SessionFactory.
public T
applyConnectionHandlingMode(PhysicalConnectionHandlingMode
The handling mode to apply
connectionHandlingMode
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyConnectionHandlingMode.

Apply the specified handling mode for JDBC connections
public SessionFactoryBuilder
public T
applyConnectionReleaseMode(ConnectionReleaseMode
The ConnectionReleaseMode to use.
connectionReleaseMode
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyConnectionReleaseMode.

Apply a ConnectionReleaseMode.
public T
applyCurrentTenantIdentifierResolver(CurrentTenantIdentifierResolver
The resolution strategy to use.
resolver
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyCurrentTenantIdentifierResolver.

Specifies a strategy for resolving the notion of a "current" tenant-identifier when using multi-tenancy together with current sessions
public T
applyCustomEntityDirtinessStrategy(CustomEntityDirtinessStrategy
The custom strategy to be used.
strategy
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyCustomEntityDirtinessStrategy.

Specifies a custom entity dirtiness strategy to be applied to the SessionFactory.
public T
applyDefaultBatchFetchSize(int
The size to use for batch fetching for entities/collections which do not specify an explicit batch fetch size.
size
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyDefaultBatchFetchSize.

Allows specifying a default batch-fetch size for all entities and collections which do not otherwise specify a batch-fetch size.
public T
applyDefaultEntityMode(EntityMode
The default entity mode to use.
entityMode
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyDefaultEntityMode.

Applies the given entity mode as the default for the SessionFactory.
public T
applyDefaultNullPrecedence(NullPrecedence
The default null precedence to use.
nullPrecedence
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyDefaultNullPrecedence.

Apply a null precedence (NULLS FIRST, NULLS LAST) to be applied order-by clauses rendered into SQL queries.
public SessionFactoryBuilder
applyDelayedEntityLoaderCreations(boolean delay)

Implements org.hibernate.boot.SessionFactoryBuilder.applyDelayedEntityLoaderCreations.

Should entity Loaders be generated immediately?
public T
applyDirectReferenceCaching(boolean
true indicates that applicable entities will be stored into the second-level cache directly by reference; false indicates that all entities will be stored via the extraction approach.
enabled
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyDirectReferenceCaching.

Generally, Hibernate will extract the information from an entity and put that extracted information into the second-level cache.
public T
applyEntityNotFoundDelegate(EntityNotFoundDelegate
The delegate/strategy to use.
entityNotFoundDelegate
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyEntityNotFoundDelegate.

Names the org.hibernate.proxy.EntityNotFoundDelegate to be applied to the SessionFactory.
public T
applyEntityTuplizer(EntityMode
The entity mode that which this tuplizer will be applied.
entityMode
,
Class<? extends EntityTuplizer>
The custom tuplizer class.
tuplizerClass
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyEntityTuplizer.

Register the default org.hibernate.tuple.entity.EntityTuplizer to be applied to the SessionFactory.
public T
applyEntityTuplizerFactory(EntityTuplizerFactory
The EntityTuplizerFactory to use.
entityTuplizerFactory
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyEntityTuplizerFactory.

Specify the EntityTuplizerFactory to use.
public T
applyGetGeneratedKeysSupport(boolean
true indicates we should use JDBC getGeneratedKeys support; false indicates we should not.
enabled
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyGetGeneratedKeysSupport.

Should JDBC java.sql.PreparedStatement#getGeneratedKeys() feature be used for retrieval of *insert-generated* ids?
public T
applyIdentifierRollbackSupport(boolean
true indicates identifiers should be unset; false indicates not.
enabled
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyIdentifierRollbackSupport.

Should generated identifiers be "unset" on entities during a rollback?
public T
applyInterceptor(Interceptor
The interceptor
interceptor
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyInterceptor.

Names an interceptor to be applied to the SessionFactory, which in turn means it will be used by all Sessions unless one is explicitly specified in org.hibernate.SessionBuilder#interceptor
public T
applyJdbcBatchingForVersionedEntities(boolean
The batch size to use.
enabled
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyJdbcBatchingForVersionedEntities.

This setting controls whether versioned entities will be included in JDBC batching.
public T
applyJdbcBatchSize(int
The batch size to use.
size
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyJdbcBatchSize.

Specifies the maximum number of statements to batch together in a JDBC batch for insert, update and delete operations.
public T
applyJdbcFetchSize(int
The fetch size to be passed to the driver.
size
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyJdbcFetchSize.

Apply a fetch size to the JDBC driver for fetching results.
public T
applyJtaTrackingByThread(boolean
true indicates we should track by thread; false indicates not
enabled
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyJtaTrackingByThread.

If using the built-in Hibernate JTA-based TransactionCoordinator/Builder, should it track JTA transactions by thread in an attempt to detect timeouts?
public T
applyLazyInitializationOutsideTransaction(boolean
true indicates initialization outside the transaction should be allowed; false indicates it should not.
enabled
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyLazyInitializationOutsideTransaction.

Should the application be allowed to initialize uninitialized lazy state outside the bounds of a transaction?
public T
applyMaximumFetchDepth(int
The depth for limiting joins.
depth
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyMaximumFetchDepth.

Apply a limit to the depth Hibernate will use for outer joins.
public T
applyMinimalPutsForCaching(boolean
true indicates Hibernate should first check whether data exists and only push to the cache if it does not already exist. false indicates to perform the default behavior.
enabled
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyMinimalPutsForCaching.

By default, Hibernate will always just push data into the cache without first checking if that data already exists.
public T
applyMultiTableBulkIdStrategy(MultiTableBulkIdStrategy
The strategy for handling multi-table updates and deletes.
strategy
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyMultiTableBulkIdStrategy.

How should updates and deletes that span multiple tables be handled?
public T
applyMultiTenancyStrategy(MultiTenancyStrategy
The form of multi-tenancy in use.
strategy
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyMultiTenancyStrategy.

Apply the form of multi-tenancy used by the application
public T
applyName(String
The name to use for the SessionFactory being built
sessionFactoryName
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyName.

Applies a SessionFactory name.
public T
applyNameAsJndiName(boolean
true indicates that the name specified in applyName will be used for binding the SessionFactory into JNDI.
isJndiName
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyNameAsJndiName.

Applies a SessionFactory name.
public T
applyNamedQueryCheckingOnStartup(boolean
true indicates that they should; false indicates they should not.
enabled
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyNamedQueryCheckingOnStartup.

Should named queries be checked on startup?
public T
applyNullabilityChecking(boolean
true indicates that Hibernate should perform nullness checking; false indicates it should not.
enabled
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyNullabilityChecking.

Should attributes using columns marked as not-null be checked (by Hibernate) for nullness?
public T
applyOrderingOfInserts(boolean
true indicates that ordering should be enabled; false indicates not
enabled
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyOrderingOfInserts.

Apply whether ordering of inserts should be enabled.
public T
applyOrderingOfUpdates(boolean
true indicates that ordering should be enabled; false indicates not
enabled
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyOrderingOfUpdates.

Apply whether ordering of updates should be enabled.
public T
applyPreferUserTransactions(boolean
true indicates we should prefer javax.transaction.UserTransaction; false indicates we should prefer javax.transaction.Transaction
preferUserTransactions
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyPreferUserTransactions.

If using the built-in Hibernate JTA-based TransactionCoordinator/Builder, should it prefer to use javax.transaction.UserTransaction over javax.transaction.Transaction?
public T
applyQueryCacheSupport(boolean
true indicates we should enable the use of second level query caching; false indicates we should disable the use of second level query caching.
enabled
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyQueryCacheSupport.

Should second level query caching support be enabled?
public T
applyQuerySubstitutions(Map<K, V>
The substitution map
substitutions
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyQuerySubstitutions.

Apply query substitutions to use in HQL queries.
public T
applyResultSetsWrapping(boolean
true indicates Hibernate should wrap result sets; false indicates it should not.
enabled
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyResultSetsWrapping.

Hibernate currently accesses results from the JDBC ResultSet by name.
public T
applyScrollableResultsSupport(boolean
true to enable this support, false to disable it
enabled
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyScrollableResultsSupport.

Should scrollable results be supported in queries?
public T
applySecondLevelCacheSupport(boolean
true indicates we should enable the use of second level caching; false indicates we should disable the use of second level caching.
enabled
)

Implements org.hibernate.boot.SessionFactoryBuilder.applySecondLevelCacheSupport.

Should second level caching support be enabled?
public T
applySqlComments(boolean
true indicates comments should be applied; false indicates not.
enabled
)

Implements org.hibernate.boot.SessionFactoryBuilder.applySqlComments.

Should Hibernate apply comments to SQL it generates?
public T
applySqlFunction(String
The name to register it under.
registrationName
,
SQLFunction
The SQLFunction impl
sqlFunction
)

Implements org.hibernate.boot.SessionFactoryBuilder.applySqlFunction.

Apply a SQLFunction to the underlying org.hibernate.dialect.function.SQLFunctionRegistry.
public T
applyStatelessInterceptor(Supplier<? extends Interceptor>
Supplier instance which is used to retrieve the interceptor
statelessInterceptorSupplier
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyStatelessInterceptor.

Names a Supplier instance which is used to retrieve the interceptor to be applied to the SessionFactory, which in turn means it will be used by all Sessions unless one is explicitly specified in org.hibernate.SessionBuilder#interceptor
public T
applyStatelessInterceptor(Class<? extends Interceptor>
The interceptor class
statelessInterceptorClass
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyStatelessInterceptor.

Names an interceptor Class to be applied to the SessionFactory, which in turn means it will be used by all Sessions unless one is explicitly specified in org.hibernate.SessionBuilder#interceptor
public T
applyStatementInspector(StatementInspector
The StatementInspector
statementInspector
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyStatementInspector.

Names a StatementInspector to be applied to the SessionFactory, which in turn means it will be used by all Sessions unless one is explicitly specified in org.hibernate.SessionBuilder#statementInspector
public T
applyStatisticsSupport(boolean
true indicates that statistics gathering should be enabled; false indicates not.
enabled
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyStatisticsSupport.

Applies whether statistics gathering is enabled.
public T
applyStrictJpaQueryLanguageCompliance(boolean
true indicates that we should strictly adhere to the JPQL subset; false indicates we should accept the broader HQL syntax.
enabled
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyStrictJpaQueryLanguageCompliance.

Should we strictly adhere to JPA Query Language (JPQL) syntax, or more broadly support all of Hibernate's superset (HQL)?
public T
applyStructuredCacheEntries(boolean
true indicates that structured cache entries (human readable) should be used; false indicates that the native entry structure should be used.
enabled
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyStructuredCacheEntries.

By default, Hibernate stores data in the cache in its own optimized format.
public T
public SessionFactoryBuilder
applyTimestampsCacheFactory(TimestampsCacheFactory
The QueryCacheFactory to use
factory
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyTimestampsCacheFactory.

Specifies a QueryCacheFactory to use for building query cache handlers.
public T
applyValidatorFactory(Object
The Bean Validation ValidatorFactory to use
validatorFactory
)

Implements org.hibernate.boot.SessionFactoryBuilder.applyValidatorFactory.

Apply a Bean Validation ValidatorFactory to the SessionFactory being built.
public SessionFactory
build()

Implements org.hibernate.boot.SessionFactoryBuilder.build.

Deprecated as a consequence of SessionFactory being deprecated.
After all options have been set, build the SessionFactory.
protected SessionFactoryBuilder
public SessionFactoryBuilder
public SessionFactoryBuilder
public SessionFactoryBuilder
public SessionFactoryBuilder
public T
enableReleaseResourcesOnCloseEnabled(boolean enable)

Implements org.hibernate.boot.SessionFactoryBuilder.enableReleaseResourcesOnCloseEnabled.

Should resources held by javax.persistence.EntityManager instance be released immediately on close?
protected abstract T
getThis()

Returns a specific implementation.

public <S extends SessionFactoryBuilder> S
unwrap(Class<S> type)

Implements org.hibernate.boot.SessionFactoryBuilder.unwrap.

Allows unwrapping this builder as another, more specific type.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait