@@ -154,7 +154,7 @@ default String getReturnedClassName() {
154
154
*
155
155
* @throws HibernateException A problem occurred performing the comparison
156
156
*/
157
- boolean isSame (Object x , Object y ) throws HibernateException ;
157
+ boolean isSame (@ Nullable Object x , @ Nullable Object y ) throws HibernateException ;
158
158
159
159
/**
160
160
* Compare two instances of the class mapped by this type for persistence "equality",
@@ -173,7 +173,7 @@ default String getReturnedClassName() {
173
173
*
174
174
* @throws HibernateException A problem occurred performing the comparison
175
175
*/
176
- boolean isEqual (Object x , Object y ) throws HibernateException ;
176
+ boolean isEqual (@ Nullable Object x , @ Nullable Object y ) throws HibernateException ;
177
177
178
178
/**
179
179
* Compare two instances of the class mapped by this type for persistence "equality",
@@ -193,7 +193,7 @@ default String getReturnedClassName() {
193
193
*
194
194
* @throws HibernateException A problem occurred performing the comparison
195
195
*/
196
- boolean isEqual (Object x , Object y , SessionFactoryImplementor factory ) throws HibernateException ;
196
+ boolean isEqual (@ Nullable Object x , @ Nullable Object y , SessionFactoryImplementor factory ) throws HibernateException ;
197
197
198
198
/**
199
199
* Get a hash code, consistent with persistence "equality". For most types this could
@@ -229,9 +229,9 @@ default String getReturnedClassName() {
229
229
*
230
230
* @see java.util.Comparator#compare(Object, Object)
231
231
*/
232
- int compare (Object x , Object y );
232
+ int compare (@ Nullable Object x , @ Nullable Object y );
233
233
234
- int compare (Object x , Object y , SessionFactoryImplementor sessionFactory );
234
+ int compare (@ Nullable Object x , @ Nullable Object y , SessionFactoryImplementor sessionFactory );
235
235
236
236
/**
237
237
* Should the parent be considered dirty, given both the old and current value?
@@ -244,7 +244,7 @@ default String getReturnedClassName() {
244
244
*
245
245
* @throws HibernateException A problem occurred performing the checking
246
246
*/
247
- boolean isDirty (Object old , Object current , SharedSessionContractImplementor session ) throws HibernateException ;
247
+ boolean isDirty (@ Nullable Object old , @ Nullable Object current , SharedSessionContractImplementor session ) throws HibernateException ;
248
248
249
249
/**
250
250
* Should the parent be considered dirty, given both the old and current value?
@@ -258,7 +258,7 @@ default String getReturnedClassName() {
258
258
*
259
259
* @throws HibernateException A problem occurred performing the checking
260
260
*/
261
- boolean isDirty (Object oldState , Object currentState , boolean [] checkable , SharedSessionContractImplementor session )
261
+ boolean isDirty (@ Nullable Object oldState , @ Nullable Object currentState , boolean [] checkable , SharedSessionContractImplementor session )
262
262
throws HibernateException ;
263
263
264
264
/**
@@ -277,8 +277,8 @@ boolean isDirty(Object oldState, Object currentState, boolean[] checkable, Share
277
277
* @throws HibernateException A problem occurred performing the checking
278
278
*/
279
279
boolean isModified (
280
- Object dbState ,
281
- Object currentState ,
280
+ @ Nullable Object dbState ,
281
+ @ Nullable Object currentState ,
282
282
boolean [] checkable ,
283
283
SharedSessionContractImplementor session )
284
284
throws HibernateException ;
@@ -300,7 +300,7 @@ boolean isModified(
300
300
*/
301
301
void nullSafeSet (
302
302
PreparedStatement st ,
303
- Object value ,
303
+ @ Nullable Object value ,
304
304
int index ,
305
305
boolean [] settable ,
306
306
SharedSessionContractImplementor session )
@@ -320,7 +320,7 @@ void nullSafeSet(
320
320
* @throws HibernateException An error from Hibernate
321
321
* @throws SQLException An error from the JDBC driver
322
322
*/
323
- void nullSafeSet (PreparedStatement st , Object value , int index , SharedSessionContractImplementor session )
323
+ void nullSafeSet (PreparedStatement st , @ Nullable Object value , int index , SharedSessionContractImplementor session )
324
324
throws HibernateException , SQLException ;
325
325
326
326
/**
@@ -353,7 +353,7 @@ String toLoggableString(@Nullable Object value, SessionFactoryImplementor factor
353
353
*
354
354
* @throws HibernateException An error from Hibernate
355
355
*/
356
- Object deepCopy (Object value , SessionFactoryImplementor factory )
356
+ @ Nullable Object deepCopy (@ Nullable Object value , SessionFactoryImplementor factory )
357
357
throws HibernateException ;
358
358
359
359
/**
@@ -392,7 +392,7 @@ Object deepCopy(Object value, SessionFactoryImplementor factory)
392
392
*
393
393
* @throws HibernateException An error from Hibernate
394
394
*/
395
- default Serializable disassemble (Object value , SessionFactoryImplementor sessionFactory ) throws HibernateException {
395
+ default @ Nullable Serializable disassemble (@ Nullable Object value , SessionFactoryImplementor sessionFactory ) throws HibernateException {
396
396
return disassemble ( value , null , null );
397
397
}
398
398
@@ -410,7 +410,7 @@ default Serializable disassemble(Object value, SessionFactoryImplementor session
410
410
*
411
411
* @throws HibernateException An error from Hibernate
412
412
*/
413
- Serializable disassemble (Object value , SharedSessionContractImplementor session , Object owner ) throws HibernateException ;
413
+ @ Nullable Serializable disassemble (@ Nullable Object value , @ Nullable SharedSessionContractImplementor session , @ Nullable Object owner ) throws HibernateException ;
414
414
415
415
/**
416
416
* Reconstruct the object from its disassembled state. This function is the inverse of
@@ -424,15 +424,17 @@ default Serializable disassemble(Object value, SessionFactoryImplementor session
424
424
*
425
425
* @throws HibernateException An error from Hibernate
426
426
*/
427
- Object assemble (Serializable cached , SharedSessionContractImplementor session , Object owner ) throws HibernateException ;
427
+ @ Nullable Object assemble (@ Nullable Serializable cached , SharedSessionContractImplementor session , Object owner ) throws HibernateException ;
428
428
429
429
/**
430
430
* Called before assembling a query result set from the query cache, to allow batch
431
431
* fetching of entities missing from the second-level cache.
432
432
*
433
433
* @param cached The key
434
434
* @param session The originating session
435
+ * @deprecated Is not called anymore
435
436
*/
437
+ @ Deprecated (forRemoval = true , since = "6.6" )
436
438
void beforeAssemble (Serializable cached , SharedSessionContractImplementor session );
437
439
438
440
/**
@@ -452,9 +454,9 @@ default Serializable disassemble(Object value, SessionFactoryImplementor session
452
454
*
453
455
* @throws HibernateException An error from Hibernate
454
456
*/
455
- Object replace (
456
- Object original ,
457
- Object target ,
457
+ @ Nullable Object replace (
458
+ @ Nullable Object original ,
459
+ @ Nullable Object target ,
458
460
SharedSessionContractImplementor session ,
459
461
Object owner ,
460
462
Map <Object , Object > copyCache ) throws HibernateException ;
@@ -477,9 +479,9 @@ Object replace(
477
479
*
478
480
* @throws HibernateException An error from Hibernate
479
481
*/
480
- Object replace (
481
- Object original ,
482
- Object target ,
482
+ @ Nullable Object replace (
483
+ @ Nullable Object original ,
484
+ @ Nullable Object target ,
483
485
SharedSessionContractImplementor session ,
484
486
Object owner ,
485
487
Map <Object , Object > copyCache ,
@@ -494,5 +496,5 @@ Object replace(
494
496
*
495
497
* @return array indicating column nullness for a value instance
496
498
*/
497
- boolean [] toColumnNullness (Object value , Mapping mapping );
499
+ boolean [] toColumnNullness (@ Nullable Object value , Mapping mapping );
498
500
}
0 commit comments