@@ -143,7 +143,7 @@ public interface Type extends Serializable {
143
143
*
144
144
* @throws HibernateException A problem occurred performing the comparison
145
145
*/
146
- boolean isSame (Object x , Object y ) throws HibernateException ;
146
+ boolean isSame (@ Nullable Object x , @ Nullable Object y ) throws HibernateException ;
147
147
148
148
/**
149
149
* Compare two instances of the class mapped by this type for persistence "equality",
@@ -162,7 +162,7 @@ public interface Type extends Serializable {
162
162
*
163
163
* @throws HibernateException A problem occurred performing the comparison
164
164
*/
165
- boolean isEqual (Object x , Object y ) throws HibernateException ;
165
+ boolean isEqual (@ Nullable Object x , @ Nullable Object y ) throws HibernateException ;
166
166
167
167
/**
168
168
* Compare two instances of the class mapped by this type for persistence "equality",
@@ -182,7 +182,7 @@ public interface Type extends Serializable {
182
182
*
183
183
* @throws HibernateException A problem occurred performing the comparison
184
184
*/
185
- boolean isEqual (Object x , Object y , SessionFactoryImplementor factory ) throws HibernateException ;
185
+ boolean isEqual (@ Nullable Object x , @ Nullable Object y , SessionFactoryImplementor factory ) throws HibernateException ;
186
186
187
187
/**
188
188
* Get a hash code, consistent with persistence "equality". For most types this could
@@ -218,9 +218,9 @@ public interface Type extends Serializable {
218
218
*
219
219
* @see java.util.Comparator#compare(Object, Object)
220
220
*/
221
- int compare (Object x , Object y );
221
+ int compare (@ Nullable Object x , @ Nullable Object y );
222
222
223
- int compare (Object x , Object y , SessionFactoryImplementor sessionFactory );
223
+ int compare (@ Nullable Object x , @ Nullable Object y , SessionFactoryImplementor sessionFactory );
224
224
225
225
/**
226
226
* Should the parent be considered dirty, given both the old and current value?
@@ -233,7 +233,7 @@ public interface Type extends Serializable {
233
233
*
234
234
* @throws HibernateException A problem occurred performing the checking
235
235
*/
236
- boolean isDirty (Object old , Object current , SharedSessionContractImplementor session ) throws HibernateException ;
236
+ boolean isDirty (@ Nullable Object old , @ Nullable Object current , SharedSessionContractImplementor session ) throws HibernateException ;
237
237
238
238
/**
239
239
* Should the parent be considered dirty, given both the old and current value?
@@ -247,7 +247,7 @@ public interface Type extends Serializable {
247
247
*
248
248
* @throws HibernateException A problem occurred performing the checking
249
249
*/
250
- boolean isDirty (Object oldState , Object currentState , boolean [] checkable , SharedSessionContractImplementor session )
250
+ boolean isDirty (@ Nullable Object oldState , @ Nullable Object currentState , boolean [] checkable , SharedSessionContractImplementor session )
251
251
throws HibernateException ;
252
252
253
253
/**
@@ -266,8 +266,8 @@ boolean isDirty(Object oldState, Object currentState, boolean[] checkable, Share
266
266
* @throws HibernateException A problem occurred performing the checking
267
267
*/
268
268
boolean isModified (
269
- Object dbState ,
270
- Object currentState ,
269
+ @ Nullable Object dbState ,
270
+ @ Nullable Object currentState ,
271
271
boolean [] checkable ,
272
272
SharedSessionContractImplementor session )
273
273
throws HibernateException ;
@@ -289,7 +289,7 @@ boolean isModified(
289
289
*/
290
290
void nullSafeSet (
291
291
PreparedStatement st ,
292
- Object value ,
292
+ @ Nullable Object value ,
293
293
int index ,
294
294
boolean [] settable ,
295
295
SharedSessionContractImplementor session )
@@ -309,7 +309,7 @@ void nullSafeSet(
309
309
* @throws HibernateException An error from Hibernate
310
310
* @throws SQLException An error from the JDBC driver
311
311
*/
312
- void nullSafeSet (PreparedStatement st , Object value , int index , SharedSessionContractImplementor session )
312
+ void nullSafeSet (PreparedStatement st , @ Nullable Object value , int index , SharedSessionContractImplementor session )
313
313
throws HibernateException , SQLException ;
314
314
315
315
/**
@@ -342,7 +342,7 @@ String toLoggableString(@Nullable Object value, SessionFactoryImplementor factor
342
342
*
343
343
* @throws HibernateException An error from Hibernate
344
344
*/
345
- Object deepCopy (Object value , SessionFactoryImplementor factory )
345
+ @ Nullable Object deepCopy (@ Nullable Object value , SessionFactoryImplementor factory )
346
346
throws HibernateException ;
347
347
348
348
/**
@@ -381,7 +381,7 @@ Object deepCopy(Object value, SessionFactoryImplementor factory)
381
381
*
382
382
* @throws HibernateException An error from Hibernate
383
383
*/
384
- default Serializable disassemble (Object value , SessionFactoryImplementor sessionFactory ) throws HibernateException {
384
+ default @ Nullable Serializable disassemble (@ Nullable Object value , SessionFactoryImplementor sessionFactory ) throws HibernateException {
385
385
return disassemble ( value , null , null );
386
386
}
387
387
@@ -399,7 +399,7 @@ default Serializable disassemble(Object value, SessionFactoryImplementor session
399
399
*
400
400
* @throws HibernateException An error from Hibernate
401
401
*/
402
- Serializable disassemble (Object value , SharedSessionContractImplementor session , Object owner ) throws HibernateException ;
402
+ @ Nullable Serializable disassemble (@ Nullable Object value , @ Nullable SharedSessionContractImplementor session , @ Nullable Object owner ) throws HibernateException ;
403
403
404
404
/**
405
405
* Reconstruct the object from its disassembled state. This function is the inverse of
@@ -413,15 +413,17 @@ default Serializable disassemble(Object value, SessionFactoryImplementor session
413
413
*
414
414
* @throws HibernateException An error from Hibernate
415
415
*/
416
- Object assemble (Serializable cached , SharedSessionContractImplementor session , Object owner ) throws HibernateException ;
416
+ @ Nullable Object assemble (@ Nullable Serializable cached , SharedSessionContractImplementor session , Object owner ) throws HibernateException ;
417
417
418
418
/**
419
419
* Called before assembling a query result set from the query cache, to allow batch
420
420
* fetching of entities missing from the second-level cache.
421
421
*
422
422
* @param cached The key
423
423
* @param session The originating session
424
+ * @deprecated Is not called anymore
424
425
*/
426
+ @ Deprecated (forRemoval = true , since = "6.6" )
425
427
void beforeAssemble (Serializable cached , SharedSessionContractImplementor session );
426
428
427
429
/**
@@ -441,9 +443,9 @@ default Serializable disassemble(Object value, SessionFactoryImplementor session
441
443
*
442
444
* @throws HibernateException An error from Hibernate
443
445
*/
444
- Object replace (
445
- Object original ,
446
- Object target ,
446
+ @ Nullable Object replace (
447
+ @ Nullable Object original ,
448
+ @ Nullable Object target ,
447
449
SharedSessionContractImplementor session ,
448
450
Object owner ,
449
451
Map <Object , Object > copyCache ) throws HibernateException ;
@@ -466,9 +468,9 @@ Object replace(
466
468
*
467
469
* @throws HibernateException An error from Hibernate
468
470
*/
469
- Object replace (
470
- Object original ,
471
- Object target ,
471
+ @ Nullable Object replace (
472
+ @ Nullable Object original ,
473
+ @ Nullable Object target ,
472
474
SharedSessionContractImplementor session ,
473
475
Object owner ,
474
476
Map <Object , Object > copyCache ,
@@ -483,5 +485,5 @@ Object replace(
483
485
*
484
486
* @return array indicating column nullness for a value instance
485
487
*/
486
- boolean [] toColumnNullness (Object value , Mapping mapping );
488
+ boolean [] toColumnNullness (@ Nullable Object value , Mapping mapping );
487
489
}
0 commit comments