Skip to content

Commit 88eb5fd

Browse files
committed
improve documentation for SessionFactoryOptions and deprecated unused option
'hibernate.loader.delay_entity_loader_creations' currently has no effect
1 parent c250206 commit 88eb5fd

File tree

7 files changed

+174
-81
lines changed

7 files changed

+174
-81
lines changed

hibernate-core/src/main/java/org/hibernate/SessionBuilder.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ public interface SessionBuilder {
170170
* @return {@code this}, for method chaining
171171
*
172172
* @see org.hibernate.cfg.AvailableSettings#USE_IDENTIFIER_ROLLBACK
173+
*
174+
* @since 7.0
173175
*/
174176
SessionBuilder identifierRollback(boolean identifierRollback);
175177
}

hibernate-core/src/main/java/org/hibernate/boot/internal/SessionFactoryOptionsBuilder.java

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ public class SessionFactoryOptionsBuilder implements SessionFactoryOptions {
159159
private Supplier<? extends Interceptor> statelessInterceptorSupplier;
160160
private StatementInspector statementInspector;
161161
private final List<SessionFactoryObserver> sessionFactoryObserverList = new ArrayList<>();
162-
private final BaselineSessionEventsListenerBuilder baselineSessionEventsListenerBuilder; // not exposed on builder atm
163162

164163
// persistence behavior
165164
private CustomEntityDirtinessStrategy customEntityDirtinessStrategy;
@@ -168,8 +167,6 @@ public class SessionFactoryOptionsBuilder implements SessionFactoryOptions {
168167
private boolean identifierRollbackEnabled;
169168
private boolean checkNullability;
170169
private boolean initializeLazyStateOutsideTransactions;
171-
private TempTableDdlTransactionHandling tempTableDdlTransactionHandling;
172-
private boolean delayBatchFetchLoaderCreations;
173170
private int defaultBatchFetchSize;
174171
private Integer maximumFetchDepth;
175172
private boolean subselectFetchEnabled;
@@ -216,9 +213,6 @@ public class SessionFactoryOptionsBuilder implements SessionFactoryOptions {
216213
private boolean directReferenceCacheEntriesEnabled;
217214
private boolean autoEvictCollectionCache;
218215

219-
// Schema tooling
220-
private SchemaAutoTooling schemaAutoTooling;
221-
222216
// JDBC Handling
223217
private boolean getGeneratedKeysEnabled;
224218
private int jdbcBatchSize;
@@ -227,7 +221,7 @@ public class SessionFactoryOptionsBuilder implements SessionFactoryOptions {
227221
private boolean commentsEnabled;
228222
private PhysicalConnectionHandlingMode connectionHandlingMode;
229223
private boolean connectionProviderDisablesAutoCommit;
230-
private TimeZone jdbcTimeZone;
224+
private final TimeZone jdbcTimeZone;
231225
private final ValueHandlingMode criteriaValueHandlingMode;
232226
private final boolean criteriaCopyTreeEnabled;
233227
private final boolean nativeJdbcParametersIgnored;
@@ -259,6 +253,16 @@ public class SessionFactoryOptionsBuilder implements SessionFactoryOptions {
259253
private final FlushMode initialSessionFlushMode;
260254
private final LockOptions defaultLockOptions;
261255

256+
// deprecated stuff
257+
@Deprecated
258+
private TempTableDdlTransactionHandling tempTableDdlTransactionHandling;
259+
@Deprecated(forRemoval = true)
260+
private final BaselineSessionEventsListenerBuilder baselineSessionEventsListenerBuilder;
261+
@Deprecated(forRemoval = true)
262+
private SchemaAutoTooling schemaAutoTooling;
263+
@Deprecated(forRemoval = true)
264+
private boolean delayBatchFetchLoaderCreations;
265+
262266
@SuppressWarnings( "unchecked" )
263267
public SessionFactoryOptionsBuilder(StandardServiceRegistry serviceRegistry, BootstrapContext context) {
264268
this.serviceRegistry = serviceRegistry;
@@ -943,7 +947,7 @@ public TempTableDdlTransactionHandling getTempTableDdlTransactionHandling() {
943947
return tempTableDdlTransactionHandling;
944948
}
945949

946-
@Override
950+
@Override @Deprecated(forRemoval = true)
947951
public boolean isDelayBatchFetchLoaderCreationsEnabled() {
948952
return delayBatchFetchLoaderCreations;
949953
}

0 commit comments

Comments
 (0)