diff --git a/hibernate-core/src/main/java/org/hibernate/boot/SessionFactoryBuilder.java b/hibernate-core/src/main/java/org/hibernate/boot/SessionFactoryBuilder.java
index 7324b14e3d..b2af24f6c8 100644
--- a/hibernate-core/src/main/java/org/hibernate/boot/SessionFactoryBuilder.java
+++ b/hibernate-core/src/main/java/org/hibernate/boot/SessionFactoryBuilder.java
@@ -395,25 +395,6 @@ public interface SessionFactoryBuilder {
*/
SessionFactoryBuilder applyPreferUserTransactions(boolean preferUserTransactions);
- /**
- * Should we strictly adhere to JPA Query Language (JPQL) syntax, or more broadly support
- * all of Hibernate's superset (HQL)?
- *
- * Setting this to {@code true} may cause valid HQL to throw an exception because it violates
- * the JPQL subset.
- *
- * @param enabled {@code true} indicates that we should strictly adhere to the JPQL subset; {@code false}
- * indicates we should accept the broader HQL syntax.
- *
- * @return {@code this}, for method chaining
- *
- * @see org.hibernate.cfg.AvailableSettings#JPAQL_STRICT_COMPLIANCE
- *
- * @deprecated Use {@link #enableJpaQueryCompliance} instead
- */
- @Deprecated
- SessionFactoryBuilder applyStrictJpaQueryLanguageCompliance(boolean enabled);
-
/**
* Should named queries be checked on startup?
*
@@ -618,26 +599,10 @@ public interface SessionFactoryBuilder {
*/
SessionFactoryBuilder applyConnectionHandlingMode(PhysicalConnectionHandlingMode connectionHandlingMode);
- /**
- * Apply a ConnectionReleaseMode.
- *
- * @param connectionReleaseMode The ConnectionReleaseMode to use.
- *
- * @return {@code this}, for method chaining
- *
- * @see org.hibernate.cfg.AvailableSettings#RELEASE_CONNECTIONS
- *
- * @deprecated Use {@link #applyConnectionHandlingMode} instead
- */
- @Deprecated
- SessionFactoryBuilder applyConnectionReleaseMode(ConnectionReleaseMode connectionReleaseMode);
-
/**
* @see org.hibernate.cfg.AvailableSettings#CONNECTION_PROVIDER_DISABLES_AUTOCOMMIT
*/
- default SessionFactoryBuilder applyConnectionProviderDisablesAutoCommit(boolean providerDisablesAutoCommit) {
- return this;
- }
+ SessionFactoryBuilder applyConnectionProviderDisablesAutoCommit(boolean providerDisablesAutoCommit);
/**
* Should Hibernate apply comments to SQL it generates?
@@ -652,15 +617,14 @@ public interface SessionFactoryBuilder {
/**
* Apply a SQLFunction to the underlying {@link org.hibernate.query.sqm.function.SqmFunctionRegistry}.
- *
- * TODO : Ultimately I would like this to move to {@link MetadataBuilder} in conjunction with allowing mappings to reference SQLFunctions.
- * today mappings can only name SQL functions directly, not through the SQLFunctionRegistry indirection
*
* @param registrationName The name to register it under.
* @param functionDescriptor The SQLFunction impl
*
* @return {@code this}, for method chaining
*/
+ // Ultimately I would like this to move to {@link MetadataBuilder} in conjunction with allowing mappings to reference SQLFunctions.
+ // today mappings can only name SQL functions directly, not through the SQLFunctionRegistry indirection
SessionFactoryBuilder applySqlFunction(String registrationName, SqmFunctionDescriptor functionDescriptor);
/**
diff --git a/hibernate-core/src/main/java/org/hibernate/boot/internal/SessionFactoryBuilderImpl.java b/hibernate-core/src/main/java/org/hibernate/boot/internal/SessionFactoryBuilderImpl.java
index 8e925f87bb..1f695624e6 100644
--- a/hibernate-core/src/main/java/org/hibernate/boot/internal/SessionFactoryBuilderImpl.java
+++ b/hibernate-core/src/main/java/org/hibernate/boot/internal/SessionFactoryBuilderImpl.java
@@ -349,12 +349,6 @@ public class SessionFactoryBuilderImpl implements SessionFactoryBuilderImplement
return this;
}
- @Override
- public SessionFactoryBuilder applyConnectionReleaseMode(ConnectionReleaseMode connectionReleaseMode) {
- this.optionsBuilder.applyConnectionReleaseMode( connectionReleaseMode );
- return this;
- }
-
@Override
public SessionFactoryBuilder applyConnectionProviderDisablesAutoCommit(boolean providerDisablesAutoCommit) {
this.optionsBuilder.applyConnectionProviderDisablesAutoCommit( providerDisablesAutoCommit );
@@ -391,13 +385,6 @@ public class SessionFactoryBuilderImpl implements SessionFactoryBuilderImplement
return this;
}
-
- @Override
- public SessionFactoryBuilder applyStrictJpaQueryLanguageCompliance(boolean enabled) {
- this.optionsBuilder.enableStrictJpaQueryLanguageCompliance( enabled );
- return this;
- }
-
@Override
public SessionFactoryBuilder enableJpaQueryCompliance(boolean enabled) {
this.optionsBuilder.enableJpaQueryCompliance( enabled );
diff --git a/hibernate-core/src/main/java/org/hibernate/boot/internal/SessionFactoryOptionsBuilder.java b/hibernate-core/src/main/java/org/hibernate/boot/internal/SessionFactoryOptionsBuilder.java
index fd1d5b0051..c25e08274e 100644
--- a/hibernate-core/src/main/java/org/hibernate/boot/internal/SessionFactoryOptionsBuilder.java
+++ b/hibernate-core/src/main/java/org/hibernate/boot/internal/SessionFactoryOptionsBuilder.java
@@ -17,7 +17,6 @@ import java.util.TimeZone;
import java.util.concurrent.Callable;
import java.util.function.Supplier;
-import org.hibernate.ConnectionAcquisitionMode;
import org.hibernate.ConnectionReleaseMode;
import org.hibernate.CustomEntityDirtinessStrategy;
import org.hibernate.EmptyInterceptor;
@@ -179,12 +178,12 @@ public class SessionFactoryOptionsBuilder implements SessionFactoryOptions {
private Class extends Interceptor> statelessInterceptorClass;
private Supplier extends Interceptor> statelessInterceptorSupplier;
private StatementInspector statementInspector;
- private List sessionFactoryObserverList = new ArrayList<>();
- private BaselineSessionEventsListenerBuilder baselineSessionEventsListenerBuilder; // not exposed on builder atm
+ private final List sessionFactoryObserverList = new ArrayList<>();
+ private final BaselineSessionEventsListenerBuilder baselineSessionEventsListenerBuilder; // not exposed on builder atm
// persistence behavior
private CustomEntityDirtinessStrategy customEntityDirtinessStrategy;
- private List entityNameResolvers = new ArrayList<>();
+ private final List entityNameResolvers = new ArrayList<>();
private EntityNotFoundDelegate entityNotFoundDelegate;
private boolean identifierRollbackEnabled;
private EntityTuplizerFactory entityTuplizerFactory = new EntityTuplizerFactory();
@@ -269,10 +268,8 @@ public class SessionFactoryOptionsBuilder implements SessionFactoryOptions {
ConfigurationService cfgService = serviceRegistry.getService( ConfigurationService.class );
final JdbcServices jdbcServices = serviceRegistry.getService( JdbcServices.class );
- final Map configurationSettings = new HashMap();
- //noinspection unchecked
+ final Map