public class SessionFactoryBuilderImpl extends java.lang.Object implements SessionFactoryBuilderImplementor, SessionFactoryOptionsState
| Modifier and Type | Class and Description |
|---|---|
static class |
SessionFactoryBuilderImpl.SessionFactoryOptionsStateStandardImpl |
| Constructor and Description |
|---|
SessionFactoryBuilderImpl(MetadataImplementor metadata) |
| Modifier and Type | Method and Description |
|---|---|
SessionFactoryBuilder |
addEntityNameResolver(EntityNameResolver... entityNameResolvers)
Specifies one or more entity name resolvers to be applied to the SessionFactory (see the
EntityNameResolver
contract for more information.. |
SessionFactoryBuilder |
addSessionFactoryObservers(SessionFactoryObserver... observers)
Specifies one or more observers to be applied to the SessionFactory.
|
SessionFactoryBuilder |
allowOutOfTransactionUpdateOperations(boolean allow) |
SessionFactoryBuilder |
applyAutoClosing(boolean enabled)
Applies whether Sessions should be automatically closed at the end of the transaction.
|
SessionFactoryBuilder |
applyAutoFlushing(boolean enabled)
Applies whether Sessions should be automatically flushed at the end of the transaction.
|
SessionFactoryBuilder |
applyAutomaticEvictionOfCollectionCaches(boolean enabled)
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).
|
SessionFactoryBuilder |
applyBatchFetchStyle(BatchFetchStyle style)
What style of batching should be used?
|
SessionFactoryBuilder |
applyBeanManager(java.lang.Object beanManager)
Apply a CDI BeanManager to the SessionFactory being built.
|
SessionFactoryBuilder |
applyCacheRegionPrefix(java.lang.String prefix)
Apply a prefix to prepended to all cache region names for this SessionFactory.
|
SessionFactoryBuilder |
applyConnectionHandlingMode(PhysicalConnectionHandlingMode connectionHandlingMode)
Apply the specified handling mode for JDBC connections
|
SessionFactoryBuilder |
applyConnectionProviderDisablesAutoCommit(boolean providerDisablesAutoCommit) |
SessionFactoryBuilder |
applyConnectionReleaseMode(ConnectionReleaseMode connectionReleaseMode)
Apply a ConnectionReleaseMode.
|
SessionFactoryBuilder |
applyCurrentTenantIdentifierResolver(CurrentTenantIdentifierResolver resolver)
Specifies a strategy for resolving the notion of a "current" tenant-identifier when using multi-tenancy
together with current sessions
|
SessionFactoryBuilder |
applyCustomEntityDirtinessStrategy(CustomEntityDirtinessStrategy strategy)
Specifies a custom entity dirtiness strategy to be applied to the SessionFactory.
|
SessionFactoryBuilder |
applyDefaultBatchFetchSize(int size)
Allows specifying a default batch-fetch size for all entities and collections
which do not otherwise specify a batch-fetch size.
|
SessionFactoryBuilder |
applyDefaultEntityMode(EntityMode entityMode)
Applies the given entity mode as the default for the SessionFactory.
|
SessionFactoryBuilder |
applyDefaultNullPrecedence(NullPrecedence nullPrecedence)
Apply a null precedence (NULLS FIRST, NULLS LAST) to be applied order-by clauses rendered into
SQL queries.
|
SessionFactoryBuilder |
applyDirectReferenceCaching(boolean enabled)
Generally, Hibernate will extract the information from an entity and put that
extracted information into the second-level cache.
|
SessionFactoryBuilder |
applyEntityNotFoundDelegate(EntityNotFoundDelegate entityNotFoundDelegate)
Names the
EntityNotFoundDelegate to be applied to the SessionFactory. |
SessionFactoryBuilder |
applyEntityTuplizer(EntityMode entityMode,
java.lang.Class<? extends EntityTuplizer> tuplizerClass)
Register the default
EntityTuplizer to be applied to the SessionFactory. |
SessionFactoryBuilder |
applyEntityTuplizerFactory(EntityTuplizerFactory entityTuplizerFactory)
Specify the EntityTuplizerFactory to use.
|
SessionFactoryBuilder |
applyGetGeneratedKeysSupport(boolean enabled)
Should JDBC
Statement.getGeneratedKeys() feature be used for
retrieval of *insert-generated* ids? |
SessionFactoryBuilder |
applyIdentifierRollbackSupport(boolean enabled)
Should generated identifiers be "unset" on entities during a rollback?
|
SessionFactoryBuilder |
applyInterceptor(Interceptor interceptor)
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
SessionBuilder.interceptor(org.hibernate.Interceptor) |
SessionFactoryBuilder |
applyJdbcBatchingForVersionedEntities(boolean enabled)
This setting controls whether versioned entities will be included in JDBC batching.
|
SessionFactoryBuilder |
applyJdbcBatchSize(int size)
Specifies the maximum number of statements to batch together in a JDBC batch for
insert, update and delete operations.
|
SessionFactoryBuilder |
applyJdbcFetchSize(int size)
Apply a fetch size to the JDBC driver for fetching results.
|
SessionFactoryBuilder |
applyJtaTrackingByThread(boolean enabled)
If using the built-in Hibernate JTA-based TransactionCoordinator/Builder, should it track JTA
transactions by thread in an attempt to detect timeouts?
|
SessionFactoryBuilder |
applyLazyInitializationOutsideTransaction(boolean enabled)
Should the application be allowed to initialize uninitialized lazy state outside the bounds of a transaction?
|
SessionFactoryBuilder |
applyMaximumFetchDepth(int depth)
Apply a limit to the depth Hibernate will use for outer joins.
|
SessionFactoryBuilder |
applyMinimalPutsForCaching(boolean enabled)
By default, Hibernate will always just push data into the cache without first checking
if that data already exists.
|
SessionFactoryBuilder |
applyMultiTableBulkIdStrategy(MultiTableBulkIdStrategy strategy)
How should updates and deletes that span multiple tables be handled?
|
SessionFactoryBuilder |
applyMultiTenancyStrategy(MultiTenancyStrategy strategy)
Apply the form of multi-tenancy used by the application
|
SessionFactoryBuilder |
applyName(java.lang.String sessionFactoryName)
Applies a SessionFactory name.
|
SessionFactoryBuilder |
applyNameAsJndiName(boolean isJndiName)
Applies a SessionFactory name.
|
SessionFactoryBuilder |
applyNamedQueryCheckingOnStartup(boolean enabled)
Should named queries be checked on startup?
|
SessionFactoryBuilder |
applyNullabilityChecking(boolean enabled)
Should attributes using columns marked as not-null be checked (by Hibernate) for nullness?
|
SessionFactoryBuilder |
applyOrderingOfInserts(boolean enabled)
Apply whether ordering of inserts should be enabled.
|
SessionFactoryBuilder |
applyOrderingOfUpdates(boolean enabled)
Apply whether ordering of updates should be enabled.
|
SessionFactoryBuilder |
applyPreferUserTransactions(boolean preferUserTransactions)
If using the built-in Hibernate JTA-based TransactionCoordinator/Builder, should it prefer to use
UserTransaction over Transaction? |
SessionFactoryBuilder |
applyQueryCacheFactory(QueryCacheFactory factory)
Specifies a QueryCacheFactory to use for building query cache handlers.
|
SessionFactoryBuilder |
applyQueryCacheSupport(boolean enabled)
Should second level query caching support be enabled?
|
SessionFactoryBuilder |
applyQuerySubstitutions(java.util.Map substitutions)
Apply query substitutions to use in HQL queries.
|
SessionFactoryBuilder |
applyResultSetsWrapping(boolean enabled)
Hibernate currently accesses results from the JDBC ResultSet by name.
|
SessionFactoryBuilder |
applyScrollableResultsSupport(boolean enabled)
Should scrollable results be supported in queries? We ask the JDBC driver whether it
supports scrollable result sets as the default for this setting, but some drivers do not
accurately report this via DatabaseMetaData.
|
SessionFactoryBuilder |
applySecondLevelCacheSupport(boolean enabled)
Should second level caching support be enabled?
|
SessionFactoryBuilder |
applySqlComments(boolean enabled)
Should Hibernate apply comments to SQL it generates?
|
SessionFactoryBuilder |
applySqlFunction(java.lang.String registrationName,
SQLFunction sqlFunction)
Apply a SQLFunction to the underlying
SQLFunctionRegistry. |
SessionFactoryBuilder |
applyStatelessInterceptor(java.lang.Class<? extends Interceptor> statelessInterceptorClass)
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
SessionBuilder.interceptor(org.hibernate.Interceptor) |
SessionFactoryBuilder |
applyStatelessInterceptor(java.util.function.Supplier<? extends Interceptor> statelessInterceptorSupplier)
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
SessionBuilder.interceptor(org.hibernate.Interceptor) |
SessionFactoryBuilder |
applyStatementInspector(StatementInspector statementInspector)
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
SessionBuilder.statementInspector(org.hibernate.resource.jdbc.spi.StatementInspector) |
SessionFactoryBuilder |
applyStatisticsSupport(boolean enabled)
Applies whether statistics gathering is enabled.
|
SessionFactoryBuilder |
applyStrictJpaQueryLanguageCompliance(boolean enabled)
Should we strictly adhere to JPA Query Language (JPQL) syntax, or more broadly support
all of Hibernate's superset (HQL)?
Setting this to
true may cause valid HQL to throw an exception because it violates
the JPQL subset. |
SessionFactoryBuilder |
applyStructuredCacheEntries(boolean enabled)
By default, Hibernate stores data in the cache in its own optimized format.
|
SessionFactoryBuilder |
applyTempTableDdlTransactionHandling(TempTableDdlTransactionHandling handling) |
SessionFactoryBuilder |
applyValidatorFactory(java.lang.Object validatorFactory)
Apply a Bean Validation ValidatorFactory to the SessionFactory being built.
|
SessionFactory |
build()
After all options have been set, build the SessionFactory.
|
SessionFactoryOptions |
buildSessionFactoryOptions()
Build the SessionFactoryOptions that will ultimately be passed to SessionFactoryImpl constructor.
|
boolean |
connectionProviderDisablesAutoCommit() |
void |
disableJtaTransactionAccess() |
void |
disableRefreshDetachedEntity() |
SessionFactoryBuilder |
enableReleaseResourcesOnCloseEnabled(boolean enable)
Should resources held by
EntityManager instance be released immediately on close?
The other option is to release them as part of an after-transaction callback. |
BaselineSessionEventsListenerBuilder |
getBaselineSessionEventsListenerBuilder() |
BatchFetchStyle |
getBatchFetchStyle() |
java.lang.Object |
getBeanManagerReference() |
java.lang.String |
getCacheRegionPrefix() |
ConnectionReleaseMode |
getConnectionReleaseMode() |
LiteralHandlingMode |
getCriteriaLiteralHandlingMode() |
CurrentTenantIdentifierResolver |
getCurrentTenantIdentifierResolver() |
CustomEntityDirtinessStrategy |
getCustomEntityDirtinessStrategy() |
java.util.Map<java.lang.String,SQLFunction> |
getCustomSqlFunctionMap() |
int |
getDefaultBatchFetchSize() |
EntityMode |
getDefaultEntityMode() |
NullPrecedence |
getDefaultNullPrecedence() |
EntityNameResolver[] |
getEntityNameResolvers() |
EntityNotFoundDelegate |
getEntityNotFoundDelegate() |
EntityTuplizerFactory |
getEntityTuplizerFactory() |
ImmutableEntityUpdateQueryHandlingMode |
getImmutableEntityUpdateQueryHandlingMode() |
Interceptor |
getInterceptor() |
int |
getJdbcBatchSize() |
java.lang.Integer |
getJdbcFetchSize() |
java.util.TimeZone |
getJdbcTimeZone() |
java.lang.Integer |
getMaximumFetchDepth() |
MultiTableBulkIdStrategy |
getMultiTableBulkIdStrategy() |
MultiTenancyStrategy |
getMultiTenancyStrategy() |
PhysicalConnectionHandlingMode |
getPhysicalConnectionHandlingMode() |
QueryCacheFactory |
getQueryCacheFactory() |
java.util.Map |
getQuerySubstitutions() |
SchemaAutoTooling |
getSchemaAutoTooling() |
StandardServiceRegistry |
getServiceRegistry() |
java.lang.String |
getSessionFactoryName() |
SessionFactoryObserver[] |
getSessionFactoryObservers() |
java.lang.Class<? extends Interceptor> |
getStatelessInterceptorImplementor()
Returns an
Interceptor class. |
java.util.function.Supplier<? extends Interceptor> |
getStatelessInterceptorImplementorSupplier() |
StatementInspector |
getStatementInspector() |
TempTableDdlTransactionHandling |
getTempTableDdlTransactionHandling() |
java.lang.Object |
getValidatorFactoryReference() |
boolean |
inClauseParameterPaddingEnabled() |
boolean |
isAllowOutOfTransactionUpdateOperations() |
boolean |
isAllowRefreshDetachedEntity() |
boolean |
isAutoCloseSessionEnabled() |
boolean |
isAutoEvictCollectionCache() |
boolean |
isCheckNullability() |
boolean |
isCollectionJoinSubqueryRewriteEnabled() |
boolean |
isCommentsEnabled() |
boolean |
isConventionalJavaConstants() |
boolean |
isDirectReferenceCacheEntriesEnabled() |
boolean |
isFailOnPaginationOverCollectionFetchEnabled() |
boolean |
isFlushBeforeCompletionEnabled() |
boolean |
isGetGeneratedKeysEnabled() |
boolean |
isIdentifierRollbackEnabled() |
boolean |
isInitializeLazyStateOutsideTransactionsEnabled() |
boolean |
isJdbcBatchVersionedData() |
boolean |
isJpaBootstrap() |
boolean |
isJpaProxyComplianceEnabled() |
boolean |
isJtaTrackByThread() |
boolean |
isJtaTransactionAccessEnabled() |
boolean |
isMinimalPutsEnabled() |
boolean |
isNamedQueryStartupCheckingEnabled() |
boolean |
isOrderInsertsEnabled() |
boolean |
isOrderUpdatesEnabled() |
boolean |
isPreferUserTransaction() |
boolean |
isProcedureParameterNullPassingEnabled() |
boolean |
isQueryCacheEnabled() |
boolean |
isQueryParametersValidationEnabled() |
boolean |
isReleaseResourcesOnCloseEnabled() |
boolean |
isScrollableResultSetsEnabled() |
boolean |
isSecondLevelCacheEnabled() |
boolean |
isSessionFactoryNameAlsoJndiName() |
boolean |
isStatisticsEnabled() |
boolean |
isStrictJpaQueryLanguageCompliance() |
boolean |
isStructuredCacheEntriesEnabled() |
boolean |
isWrapResultSetsEnabled() |
void |
markAsJpaBootstrap()
Indicates that the SessionFactory being built comes from JPA bootstrapping.
|
<T extends SessionFactoryBuilder> |
unwrap(java.lang.Class<T> type)
Allows unwrapping this builder as another, more specific type.
|
public SessionFactoryBuilderImpl(MetadataImplementor metadata)
public SessionFactoryBuilder applyValidatorFactory(java.lang.Object validatorFactory)
SessionFactoryBuilderapplyValidatorFactory in interface SessionFactoryBuildervalidatorFactory - The Bean Validation ValidatorFactory to usethis, for method chainingpublic SessionFactoryBuilder applyBeanManager(java.lang.Object beanManager)
SessionFactoryBuilderapplyBeanManager in interface SessionFactoryBuilderbeanManager - The CDI BeanManager to usethis, for method chainingpublic SessionFactoryBuilder applyName(java.lang.String sessionFactoryName)
SessionFactoryBuilderapplyName in interface SessionFactoryBuildersessionFactoryName - The name to use for the SessionFactory being builtthis, for method chainingAvailableSettings.SESSION_FACTORY_NAMEpublic SessionFactoryBuilder applyNameAsJndiName(boolean isJndiName)
SessionFactoryBuilderapplyNameAsJndiName in interface SessionFactoryBuilderisJndiName - true indicates that the name specified in
SessionFactoryBuilder.applyName(java.lang.String) will be used for binding the SessionFactory into JNDI.this, for method chainingAvailableSettings.SESSION_FACTORY_NAME_IS_JNDIpublic SessionFactoryBuilder applyAutoClosing(boolean enabled)
SessionFactoryBuilderapplyAutoClosing in interface SessionFactoryBuilderenabled - true indicates they should be auto-closed; false indicates not.this, for method chainingAvailableSettings.AUTO_CLOSE_SESSIONpublic SessionFactoryBuilder applyAutoFlushing(boolean enabled)
SessionFactoryBuilderapplyAutoFlushing in interface SessionFactoryBuilderenabled - true indicates they should be auto-flushed; false indicates not.this, for method chainingAvailableSettings.FLUSH_BEFORE_COMPLETIONpublic SessionFactoryBuilder applyJtaTrackingByThread(boolean enabled)
SessionFactoryBuilderapplyJtaTrackingByThread in interface SessionFactoryBuilderenabled - true indicates we should track by thread; false indicates notthis, for method chainingAvailableSettings.JTA_TRACK_BY_THREADpublic SessionFactoryBuilder applyPreferUserTransactions(boolean preferUserTransactions)
SessionFactoryBuilderUserTransaction over Transaction?applyPreferUserTransactions in interface SessionFactoryBuilderpreferUserTransactions - true indicates we should prefer UserTransaction;
false indicates we should prefer Transactionthis, for method chainingAvailableSettings.PREFER_USER_TRANSACTIONpublic SessionFactoryBuilder applyStatisticsSupport(boolean enabled)
SessionFactoryBuilderapplyStatisticsSupport in interface SessionFactoryBuilderenabled - true indicates that statistics gathering should be enabled; false indicates not.this, for method chainingAvailableSettings.GENERATE_STATISTICSpublic SessionFactoryBuilder addSessionFactoryObservers(SessionFactoryObserver... observers)
SessionFactoryBuilderaddSessionFactoryObservers in interface SessionFactoryBuilderobservers - The observers to addthis, for method chainingpublic SessionFactoryBuilder applyInterceptor(Interceptor interceptor)
SessionFactoryBuilderSessionBuilder.interceptor(org.hibernate.Interceptor)applyInterceptor in interface SessionFactoryBuilderinterceptor - The interceptorthis, for method chainingAvailableSettings.INTERCEPTORpublic SessionFactoryBuilder applyStatelessInterceptor(java.lang.Class<? extends Interceptor> statelessInterceptorClass)
SessionFactoryBuilderSessionBuilder.interceptor(org.hibernate.Interceptor)applyStatelessInterceptor in interface SessionFactoryBuilderstatelessInterceptorClass - The interceptor classthis, for method chainingAvailableSettings.SESSION_SCOPED_INTERCEPTORpublic SessionFactoryBuilder applyStatelessInterceptor(java.util.function.Supplier<? extends Interceptor> statelessInterceptorSupplier)
SessionFactoryBuilderSupplier 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
SessionBuilder.interceptor(org.hibernate.Interceptor)applyStatelessInterceptor in interface SessionFactoryBuilderstatelessInterceptorSupplier - Supplier instance which is used to retrieve the interceptorthis, for method chainingAvailableSettings.SESSION_SCOPED_INTERCEPTORpublic SessionFactoryBuilder applyStatementInspector(StatementInspector statementInspector)
SessionFactoryBuilderSessionBuilder.statementInspector(org.hibernate.resource.jdbc.spi.StatementInspector)applyStatementInspector in interface SessionFactoryBuilderstatementInspector - The StatementInspectorthis, for method chainingAvailableSettings.STATEMENT_INSPECTORpublic SessionFactoryBuilder applyCustomEntityDirtinessStrategy(CustomEntityDirtinessStrategy strategy)
SessionFactoryBuilderCustomEntityDirtinessStrategy for details.applyCustomEntityDirtinessStrategy in interface SessionFactoryBuilderstrategy - The custom strategy to be used.this, for method chainingAvailableSettings.CUSTOM_ENTITY_DIRTINESS_STRATEGYpublic SessionFactoryBuilder addEntityNameResolver(EntityNameResolver... entityNameResolvers)
SessionFactoryBuilderEntityNameResolver
contract for more information.. Can be called multiple times to add additional resolvers..addEntityNameResolver in interface SessionFactoryBuilderentityNameResolvers - The entityNameResolvers to addthis, for method chainingpublic SessionFactoryBuilder applyEntityNotFoundDelegate(EntityNotFoundDelegate entityNotFoundDelegate)
SessionFactoryBuilderEntityNotFoundDelegate to be applied to the SessionFactory. EntityNotFoundDelegate is a
strategy that accounts for different exceptions thrown between Hibernate and JPA when an entity cannot be found.applyEntityNotFoundDelegate in interface SessionFactoryBuilderentityNotFoundDelegate - The delegate/strategy to use.this, for method chainingpublic SessionFactoryBuilder applyIdentifierRollbackSupport(boolean enabled)
SessionFactoryBuilderapplyIdentifierRollbackSupport in interface SessionFactoryBuilderenabled - true indicates identifiers should be unset; false indicates not.this, for method chainingAvailableSettings.USE_IDENTIFIER_ROLLBACKpublic SessionFactoryBuilder applyDefaultEntityMode(EntityMode entityMode)
SessionFactoryBuilderapplyDefaultEntityMode in interface SessionFactoryBuilderentityMode - The default entity mode to use.this, for method chainingAvailableSettings.DEFAULT_ENTITY_MODEpublic SessionFactoryBuilder applyNullabilityChecking(boolean enabled)
SessionFactoryBuilderapplyNullabilityChecking in interface SessionFactoryBuilderenabled - true indicates that Hibernate should perform nullness checking; false indicates
it should not.this, for method chainingAvailableSettings.CHECK_NULLABILITYpublic SessionFactoryBuilder applyLazyInitializationOutsideTransaction(boolean enabled)
SessionFactoryBuilderapplyLazyInitializationOutsideTransaction in interface SessionFactoryBuilderenabled - true indicates initialization outside the transaction should be allowed; false
indicates it should not.this, for method chainingAvailableSettings.ENABLE_LAZY_LOAD_NO_TRANSpublic SessionFactoryBuilder applyEntityTuplizerFactory(EntityTuplizerFactory entityTuplizerFactory)
SessionFactoryBuilderapplyEntityTuplizerFactory in interface SessionFactoryBuilderentityTuplizerFactory - The EntityTuplizerFactory to use.this, for method chainingpublic SessionFactoryBuilder applyEntityTuplizer(EntityMode entityMode, java.lang.Class<? extends EntityTuplizer> tuplizerClass)
SessionFactoryBuilderEntityTuplizer to be applied to the SessionFactory.applyEntityTuplizer in interface SessionFactoryBuilderentityMode - The entity mode that which this tuplizer will be applied.tuplizerClass - The custom tuplizer class.this, for method chainingpublic SessionFactoryBuilder applyMultiTableBulkIdStrategy(MultiTableBulkIdStrategy strategy)
SessionFactoryBuilderapplyMultiTableBulkIdStrategy in interface SessionFactoryBuilderstrategy - The strategy for handling multi-table updates and deletes.this, for method chainingAvailableSettings.HQL_BULK_ID_STRATEGYpublic SessionFactoryBuilder applyTempTableDdlTransactionHandling(TempTableDdlTransactionHandling handling)
applyTempTableDdlTransactionHandling in interface SessionFactoryBuilderpublic SessionFactoryBuilder applyBatchFetchStyle(BatchFetchStyle style)
SessionFactoryBuilderapplyBatchFetchStyle in interface SessionFactoryBuilderstyle - The style to usethis, for method chainingAvailableSettings.BATCH_FETCH_STYLEpublic SessionFactoryBuilder applyDefaultBatchFetchSize(int size)
SessionFactoryBuilderapplyDefaultBatchFetchSize in interface SessionFactoryBuildersize - The size to use for batch fetching for entities/collections which
do not specify an explicit batch fetch size.this, for method chainingAvailableSettings.DEFAULT_BATCH_FETCH_SIZEpublic SessionFactoryBuilder applyMaximumFetchDepth(int depth)
SessionFactoryBuilderapplyMaximumFetchDepth in interface SessionFactoryBuilderdepth - The depth for limiting joins.this, for method chainingAvailableSettings.MAX_FETCH_DEPTHpublic SessionFactoryBuilder applyDefaultNullPrecedence(NullPrecedence nullPrecedence)
SessionFactoryBuilderapplyDefaultNullPrecedence in interface SessionFactoryBuildernullPrecedence - The default null precedence to use.this, for method chainingAvailableSettings.DEFAULT_NULL_ORDERINGpublic SessionFactoryBuilder applyOrderingOfInserts(boolean enabled)
SessionFactoryBuilderapplyOrderingOfInserts in interface SessionFactoryBuilderenabled - true indicates that ordering should be enabled; false indicates notthis, for method chainingAvailableSettings.ORDER_INSERTSpublic SessionFactoryBuilder applyOrderingOfUpdates(boolean enabled)
SessionFactoryBuilderapplyOrderingOfUpdates in interface SessionFactoryBuilderenabled - true indicates that ordering should be enabled; false indicates notthis, for method chainingAvailableSettings.ORDER_UPDATESpublic SessionFactoryBuilder applyMultiTenancyStrategy(MultiTenancyStrategy strategy)
SessionFactoryBuilderapplyMultiTenancyStrategy in interface SessionFactoryBuilderstrategy - The form of multi-tenancy in use.this, for method chainingAvailableSettings.MULTI_TENANTpublic SessionFactoryBuilder applyCurrentTenantIdentifierResolver(CurrentTenantIdentifierResolver resolver)
SessionFactoryBuilderapplyCurrentTenantIdentifierResolver in interface SessionFactoryBuilderresolver - The resolution strategy to use.this, for method chainingAvailableSettings.MULTI_TENANT_IDENTIFIER_RESOLVERpublic SessionFactoryBuilder applyQuerySubstitutions(java.util.Map substitutions)
SessionFactoryBuilderapplyQuerySubstitutions in interface SessionFactoryBuildersubstitutions - The substitution mapthis, for method chainingAvailableSettings.QUERY_SUBSTITUTIONSpublic SessionFactoryBuilder applyStrictJpaQueryLanguageCompliance(boolean enabled)
SessionFactoryBuildertrue may cause valid HQL to throw an exception because it violates
the JPQL subset.applyStrictJpaQueryLanguageCompliance in interface SessionFactoryBuilderenabled - true indicates that we should strictly adhere to the JPQL subset; false
indicates we should accept the broader HQL syntax.this, for method chainingAvailableSettings.JPAQL_STRICT_COMPLIANCEpublic SessionFactoryBuilder applyNamedQueryCheckingOnStartup(boolean enabled)
SessionFactoryBuilderapplyNamedQueryCheckingOnStartup in interface SessionFactoryBuilderenabled - true indicates that they should; false indicates they should not.this, for method chainingAvailableSettings.QUERY_STARTUP_CHECKINGpublic SessionFactoryBuilder applySecondLevelCacheSupport(boolean enabled)
SessionFactoryBuilderapplySecondLevelCacheSupport in interface SessionFactoryBuilderenabled - true indicates we should enable the use of second level caching; false
indicates we should disable the use of second level caching.this, for method chainingAvailableSettings.USE_SECOND_LEVEL_CACHEpublic SessionFactoryBuilder applyQueryCacheSupport(boolean enabled)
SessionFactoryBuilderapplyQueryCacheSupport in interface SessionFactoryBuilderenabled - true indicates we should enable the use of second level query
caching; false indicates we should disable the use of second level query caching.this, for method chainingAvailableSettings.USE_QUERY_CACHEpublic SessionFactoryBuilder applyQueryCacheFactory(QueryCacheFactory factory)
SessionFactoryBuilderapplyQueryCacheFactory in interface SessionFactoryBuilderfactory - The QueryCacheFactory to usethis, for method chainingAvailableSettings.QUERY_CACHE_FACTORYpublic SessionFactoryBuilder applyCacheRegionPrefix(java.lang.String prefix)
SessionFactoryBuilderapplyCacheRegionPrefix in interface SessionFactoryBuilderprefix - The prefix.this, for method chainingAvailableSettings.CACHE_REGION_PREFIXpublic SessionFactoryBuilder applyMinimalPutsForCaching(boolean enabled)
SessionFactoryBuilderapplyMinimalPutsForCaching in interface SessionFactoryBuilderenabled - 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.this, for method chainingAvailableSettings.USE_MINIMAL_PUTS,
RegionFactory.isMinimalPutsEnabledByDefault()public SessionFactoryBuilder applyStructuredCacheEntries(boolean enabled)
SessionFactoryBuilderapplyStructuredCacheEntries in interface SessionFactoryBuilderenabled - true indicates that structured cache entries (human readable) should be used;
false indicates that the native entry structure should be used.this, for method chainingAvailableSettings.USE_STRUCTURED_CACHEpublic SessionFactoryBuilder applyDirectReferenceCaching(boolean enabled)
SessionFactoryBuilderapplyDirectReferenceCaching in interface SessionFactoryBuilderenabled - 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.this, for method chainingAvailableSettings.USE_DIRECT_REFERENCE_CACHE_ENTRIESpublic SessionFactoryBuilder applyAutomaticEvictionOfCollectionCaches(boolean enabled)
SessionFactoryBuilderapplyAutomaticEvictionOfCollectionCaches in interface SessionFactoryBuilderenabled - true indicates that these collection caches should be evicted automatically.this, for method chainingAvailableSettings.AUTO_EVICT_COLLECTION_CACHEpublic SessionFactoryBuilder applyJdbcBatchSize(int size)
SessionFactoryBuilderapplyJdbcBatchSize in interface SessionFactoryBuildersize - The batch size to use.this, for method chainingAvailableSettings.STATEMENT_BATCH_SIZEpublic SessionFactoryBuilder applyJdbcBatchingForVersionedEntities(boolean enabled)
SessionFactoryBuilderfalse by default.applyJdbcBatchingForVersionedEntities in interface SessionFactoryBuilderenabled - The batch size to use.this, for method chainingAvailableSettings.BATCH_VERSIONED_DATApublic SessionFactoryBuilder applyScrollableResultsSupport(boolean enabled)
SessionFactoryBuilderapplyScrollableResultsSupport in interface SessionFactoryBuilderenabled - true to enable this support, false to disable itthis, for method chainingAvailableSettings.USE_SCROLLABLE_RESULTSETpublic SessionFactoryBuilder applyResultSetsWrapping(boolean enabled)
SessionFactoryBuilderapplyResultSetsWrapping in interface SessionFactoryBuilderenabled - true indicates Hibernate should wrap result sets; false indicates
it should not.this, for method chainingAvailableSettings.WRAP_RESULT_SETSpublic SessionFactoryBuilder applyGetGeneratedKeysSupport(boolean enabled)
SessionFactoryBuilderStatement.getGeneratedKeys() feature be used for
retrieval of *insert-generated* ids?applyGetGeneratedKeysSupport in interface SessionFactoryBuilderenabled - true indicates we should use JDBC getGeneratedKeys support; false
indicates we should not.this, for method chainingAvailableSettings.USE_GET_GENERATED_KEYSpublic SessionFactoryBuilder applyJdbcFetchSize(int size)
SessionFactoryBuilderapplyJdbcFetchSize in interface SessionFactoryBuildersize - The fetch saize to be passed to the driver.this, for method chainingAvailableSettings.USE_GET_GENERATED_KEYS,
Statement.setFetchSize(int)public SessionFactoryBuilder applyConnectionHandlingMode(PhysicalConnectionHandlingMode connectionHandlingMode)
SessionFactoryBuilderapplyConnectionHandlingMode in interface SessionFactoryBuilderconnectionHandlingMode - The handling mode to applythis, for method chainingAvailableSettings.ACQUIRE_CONNECTIONS,
AvailableSettings.RELEASE_CONNECTIONS,
ConnectionAcquisitionMode,
ConnectionReleaseModepublic SessionFactoryBuilder applyConnectionReleaseMode(ConnectionReleaseMode connectionReleaseMode)
SessionFactoryBuilderapplyConnectionReleaseMode in interface SessionFactoryBuilderconnectionReleaseMode - The ConnectionReleaseMode to use.this, for method chainingAvailableSettings.RELEASE_CONNECTIONSpublic SessionFactoryBuilder applyConnectionProviderDisablesAutoCommit(boolean providerDisablesAutoCommit)
applyConnectionProviderDisablesAutoCommit in interface SessionFactoryBuilderAvailableSettings.CONNECTION_PROVIDER_DISABLES_AUTOCOMMITpublic SessionFactoryBuilder applySqlComments(boolean enabled)
SessionFactoryBuilderapplySqlComments in interface SessionFactoryBuilderenabled - true indicates comments should be applied; false indicates not.this, for method chainingAvailableSettings.USE_SQL_COMMENTSpublic SessionFactoryBuilder applySqlFunction(java.lang.String registrationName, SQLFunction sqlFunction)
SessionFactoryBuilderSQLFunctionRegistry.
TODO : Ultimately I would like this to move to MetadataBuilder in conjunction with allowing mappings to reference SQLFunctions.
today mappings can only name SQL functions directly, not through the SQLFunctionRegistry indirectionapplySqlFunction in interface SessionFactoryBuilderregistrationName - The name to register it under.sqlFunction - The SQLFunction implthis, for method chainingpublic SessionFactoryBuilder allowOutOfTransactionUpdateOperations(boolean allow)
allowOutOfTransactionUpdateOperations in interface SessionFactoryBuilderpublic SessionFactoryBuilder enableReleaseResourcesOnCloseEnabled(boolean enable)
SessionFactoryBuilderEntityManager instance be released immediately on close?
The other option is to release them as part of an after-transaction callback.enableReleaseResourcesOnCloseEnabled in interface SessionFactoryBuilderpublic <T extends SessionFactoryBuilder> T unwrap(java.lang.Class<T> type)
SessionFactoryBuilderunwrap in interface SessionFactoryBuilderpublic SessionFactory build()
SessionFactoryBuilderbuild in interface SessionFactoryBuilderpublic void markAsJpaBootstrap()
SessionFactoryBuilderImplementorfalse is the assumed value. We only need to call this to
mark that as true.markAsJpaBootstrap in interface SessionFactoryBuilderImplementorpublic void disableRefreshDetachedEntity()
disableRefreshDetachedEntity in interface SessionFactoryBuilderImplementorpublic void disableJtaTransactionAccess()
disableJtaTransactionAccess in interface SessionFactoryBuilderImplementorpublic SessionFactoryOptions buildSessionFactoryOptions()
SessionFactoryBuilderImplementorbuildSessionFactoryOptions in interface SessionFactoryBuilderImplementorpublic StandardServiceRegistry getServiceRegistry()
getServiceRegistry in interface SessionFactoryOptionsStatepublic boolean isJpaBootstrap()
isJpaBootstrap in interface SessionFactoryOptionsStatepublic boolean isJtaTransactionAccessEnabled()
isJtaTransactionAccessEnabled in interface SessionFactoryOptionsStatepublic boolean isAllowRefreshDetachedEntity()
isAllowRefreshDetachedEntity in interface SessionFactoryOptionsStatepublic boolean isAllowOutOfTransactionUpdateOperations()
isAllowOutOfTransactionUpdateOperations in interface SessionFactoryOptionsStatepublic boolean isReleaseResourcesOnCloseEnabled()
isReleaseResourcesOnCloseEnabled in interface SessionFactoryOptionsStatepublic java.lang.Object getBeanManagerReference()
getBeanManagerReference in interface SessionFactoryOptionsStatepublic java.lang.Object getValidatorFactoryReference()
getValidatorFactoryReference in interface SessionFactoryOptionsStatepublic java.lang.String getSessionFactoryName()
getSessionFactoryName in interface SessionFactoryOptionsStatepublic boolean isSessionFactoryNameAlsoJndiName()
isSessionFactoryNameAlsoJndiName in interface SessionFactoryOptionsStatepublic boolean isFlushBeforeCompletionEnabled()
isFlushBeforeCompletionEnabled in interface SessionFactoryOptionsStatepublic boolean isAutoCloseSessionEnabled()
isAutoCloseSessionEnabled in interface SessionFactoryOptionsStatepublic boolean isStatisticsEnabled()
isStatisticsEnabled in interface SessionFactoryOptionsStatepublic Interceptor getInterceptor()
getInterceptor in interface SessionFactoryOptionsStatepublic java.lang.Class<? extends Interceptor> getStatelessInterceptorImplementor()
SessionFactoryOptionsStateInterceptor class.getStatelessInterceptorImplementor in interface SessionFactoryOptionsStateInterceptor classpublic java.util.function.Supplier<? extends Interceptor> getStatelessInterceptorImplementorSupplier()
getStatelessInterceptorImplementorSupplier in interface SessionFactoryOptionsStatepublic StatementInspector getStatementInspector()
getStatementInspector in interface SessionFactoryOptionsStatepublic SessionFactoryObserver[] getSessionFactoryObservers()
getSessionFactoryObservers in interface SessionFactoryOptionsStatepublic BaselineSessionEventsListenerBuilder getBaselineSessionEventsListenerBuilder()
getBaselineSessionEventsListenerBuilder in interface SessionFactoryOptionsStatepublic boolean isIdentifierRollbackEnabled()
isIdentifierRollbackEnabled in interface SessionFactoryOptionsStatepublic EntityMode getDefaultEntityMode()
getDefaultEntityMode in interface SessionFactoryOptionsStatepublic EntityTuplizerFactory getEntityTuplizerFactory()
getEntityTuplizerFactory in interface SessionFactoryOptionsStatepublic boolean isCheckNullability()
isCheckNullability in interface SessionFactoryOptionsStatepublic boolean isInitializeLazyStateOutsideTransactionsEnabled()
isInitializeLazyStateOutsideTransactionsEnabled in interface SessionFactoryOptionsStatepublic MultiTableBulkIdStrategy getMultiTableBulkIdStrategy()
getMultiTableBulkIdStrategy in interface SessionFactoryOptionsStatepublic TempTableDdlTransactionHandling getTempTableDdlTransactionHandling()
getTempTableDdlTransactionHandling in interface SessionFactoryOptionsStatepublic BatchFetchStyle getBatchFetchStyle()
getBatchFetchStyle in interface SessionFactoryOptionsStatepublic int getDefaultBatchFetchSize()
getDefaultBatchFetchSize in interface SessionFactoryOptionsStatepublic java.lang.Integer getMaximumFetchDepth()
getMaximumFetchDepth in interface SessionFactoryOptionsStatepublic NullPrecedence getDefaultNullPrecedence()
getDefaultNullPrecedence in interface SessionFactoryOptionsStatepublic boolean isOrderUpdatesEnabled()
isOrderUpdatesEnabled in interface SessionFactoryOptionsStatepublic boolean isOrderInsertsEnabled()
isOrderInsertsEnabled in interface SessionFactoryOptionsStatepublic MultiTenancyStrategy getMultiTenancyStrategy()
getMultiTenancyStrategy in interface SessionFactoryOptionsStatepublic CurrentTenantIdentifierResolver getCurrentTenantIdentifierResolver()
getCurrentTenantIdentifierResolver in interface SessionFactoryOptionsStatepublic boolean isJtaTrackByThread()
isJtaTrackByThread in interface SessionFactoryOptionsStatepublic java.util.Map getQuerySubstitutions()
getQuerySubstitutions in interface SessionFactoryOptionsStatepublic boolean isStrictJpaQueryLanguageCompliance()
isStrictJpaQueryLanguageCompliance in interface SessionFactoryOptionsStatepublic boolean isNamedQueryStartupCheckingEnabled()
isNamedQueryStartupCheckingEnabled in interface SessionFactoryOptionsStatepublic boolean isConventionalJavaConstants()
isConventionalJavaConstants in interface SessionFactoryOptionsStatepublic boolean isProcedureParameterNullPassingEnabled()
isProcedureParameterNullPassingEnabled in interface SessionFactoryOptionsStatepublic boolean isCollectionJoinSubqueryRewriteEnabled()
isCollectionJoinSubqueryRewriteEnabled in interface SessionFactoryOptionsStatepublic boolean isSecondLevelCacheEnabled()
isSecondLevelCacheEnabled in interface SessionFactoryOptionsStatepublic boolean isQueryCacheEnabled()
isQueryCacheEnabled in interface SessionFactoryOptionsStatepublic QueryCacheFactory getQueryCacheFactory()
getQueryCacheFactory in interface SessionFactoryOptionsStatepublic java.lang.String getCacheRegionPrefix()
getCacheRegionPrefix in interface SessionFactoryOptionsStatepublic boolean isMinimalPutsEnabled()
isMinimalPutsEnabled in interface SessionFactoryOptionsStatepublic boolean isStructuredCacheEntriesEnabled()
isStructuredCacheEntriesEnabled in interface SessionFactoryOptionsStatepublic boolean isDirectReferenceCacheEntriesEnabled()
isDirectReferenceCacheEntriesEnabled in interface SessionFactoryOptionsStatepublic boolean isAutoEvictCollectionCache()
isAutoEvictCollectionCache in interface SessionFactoryOptionsStatepublic SchemaAutoTooling getSchemaAutoTooling()
getSchemaAutoTooling in interface SessionFactoryOptionsStatepublic int getJdbcBatchSize()
getJdbcBatchSize in interface SessionFactoryOptionsStatepublic boolean isJdbcBatchVersionedData()
isJdbcBatchVersionedData in interface SessionFactoryOptionsStatepublic boolean isScrollableResultSetsEnabled()
isScrollableResultSetsEnabled in interface SessionFactoryOptionsStatepublic boolean isWrapResultSetsEnabled()
isWrapResultSetsEnabled in interface SessionFactoryOptionsStatepublic boolean isGetGeneratedKeysEnabled()
isGetGeneratedKeysEnabled in interface SessionFactoryOptionsStatepublic java.lang.Integer getJdbcFetchSize()
getJdbcFetchSize in interface SessionFactoryOptionsStatepublic PhysicalConnectionHandlingMode getPhysicalConnectionHandlingMode()
getPhysicalConnectionHandlingMode in interface SessionFactoryOptionsStatepublic boolean connectionProviderDisablesAutoCommit()
connectionProviderDisablesAutoCommit in interface SessionFactoryOptionsStatepublic ConnectionReleaseMode getConnectionReleaseMode()
getConnectionReleaseMode in interface SessionFactoryOptionsStatepublic boolean isCommentsEnabled()
isCommentsEnabled in interface SessionFactoryOptionsStatepublic CustomEntityDirtinessStrategy getCustomEntityDirtinessStrategy()
getCustomEntityDirtinessStrategy in interface SessionFactoryOptionsStatepublic EntityNameResolver[] getEntityNameResolvers()
getEntityNameResolvers in interface SessionFactoryOptionsStatepublic EntityNotFoundDelegate getEntityNotFoundDelegate()
getEntityNotFoundDelegate in interface SessionFactoryOptionsStatepublic java.util.Map<java.lang.String,SQLFunction> getCustomSqlFunctionMap()
getCustomSqlFunctionMap in interface SessionFactoryOptionsStatepublic boolean isPreferUserTransaction()
isPreferUserTransaction in interface SessionFactoryOptionsStatepublic java.util.TimeZone getJdbcTimeZone()
getJdbcTimeZone in interface SessionFactoryOptionsStatepublic boolean isQueryParametersValidationEnabled()
isQueryParametersValidationEnabled in interface SessionFactoryOptionsStatepublic LiteralHandlingMode getCriteriaLiteralHandlingMode()
getCriteriaLiteralHandlingMode in interface SessionFactoryOptionsStatepublic boolean isFailOnPaginationOverCollectionFetchEnabled()
isFailOnPaginationOverCollectionFetchEnabled in interface SessionFactoryOptionsStatepublic boolean isJpaProxyComplianceEnabled()
isJpaProxyComplianceEnabled in interface SessionFactoryOptionsStatepublic ImmutableEntityUpdateQueryHandlingMode getImmutableEntityUpdateQueryHandlingMode()
getImmutableEntityUpdateQueryHandlingMode in interface SessionFactoryOptionsStatepublic boolean inClauseParameterPaddingEnabled()
inClauseParameterPaddingEnabled in interface SessionFactoryOptionsStateCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.