@@ -109,7 +109,7 @@ private EntityEntry(
109
109
final Status status ,
110
110
final Status previousStatus ,
111
111
final Object [] loadedState ,
112
- final Object [] deletedState ,
112
+ final Object [] deletedState ,
113
113
final Object version ,
114
114
final LockMode lockMode ,
115
115
final boolean existsInDatabase ,
@@ -206,11 +206,11 @@ public String getEntityName() {
206
206
public boolean isBeingReplicated () {
207
207
return isBeingReplicated ;
208
208
}
209
-
209
+
210
210
public Object getRowId () {
211
211
return rowId ;
212
212
}
213
-
213
+
214
214
/**
215
215
* Handle updating the internal state of the entry after actually performing
216
216
* the database update. Specifically we update the snapshot information and
@@ -236,8 +236,8 @@ public void postUpdate(Object entity, Object[] updatedState, Object nextVersion)
236
236
interceptor .clearDirty ();
237
237
}
238
238
}
239
- if ( entity instanceof SelfDirtinessTracker )
240
- ((SelfDirtinessTracker ) entity ).$$_hibernate_clearDirtyAttributes ();
239
+ if ( entity instanceof SelfDirtinessTracker )
240
+ ((SelfDirtinessTracker ) entity ).$$_hibernate_clearDirtyAttributes ();
241
241
242
242
persistenceContext .getSession ()
243
243
.getFactory ()
@@ -254,15 +254,15 @@ public void postDelete() {
254
254
status = Status .GONE ;
255
255
existsInDatabase = false ;
256
256
}
257
-
257
+
258
258
/**
259
259
* After actually inserting a row, record the fact that the instance exists on the
260
260
* database (needed for identity-column key generation)
261
261
*/
262
262
public void postInsert (Object [] insertedState ) {
263
263
existsInDatabase = true ;
264
264
}
265
-
265
+
266
266
public boolean isNullifiable (boolean earlyInsert , SessionImplementor session ) {
267
267
return getStatus () == Status .SAVING || (
268
268
earlyInsert ?
@@ -271,7 +271,7 @@ public boolean isNullifiable(boolean earlyInsert, SessionImplementor session) {
271
271
.contains ( getEntityKey () )
272
272
);
273
273
}
274
-
274
+
275
275
public Object getLoadedValue (String propertyName ) {
276
276
if ( loadedState == null ) {
277
277
return null ;
@@ -303,24 +303,24 @@ public boolean requiresDirtyCheck(Object entity) {
303
303
@ SuppressWarnings ( {"SimplifiableIfStatement" })
304
304
private boolean isUnequivocallyNonDirty (Object entity ) {
305
305
306
- if (entity instanceof SelfDirtinessTracker )
307
- return ((SelfDirtinessTracker ) entity ).$$_hibernate_hasDirtyAttributes ();
306
+ if (entity instanceof SelfDirtinessTracker )
307
+ return ((SelfDirtinessTracker ) entity ).$$_hibernate_hasDirtyAttributes ();
308
308
309
309
final CustomEntityDirtinessStrategy customEntityDirtinessStrategy =
310
310
persistenceContext .getSession ().getFactory ().getCustomEntityDirtinessStrategy ();
311
311
if ( customEntityDirtinessStrategy .canDirtyCheck ( entity , getPersister (), (Session ) persistenceContext .getSession () ) ) {
312
312
return ! customEntityDirtinessStrategy .isDirty ( entity , getPersister (), (Session ) persistenceContext .getSession () );
313
313
}
314
-
314
+
315
315
if ( getPersister ().hasMutableProperties () ) {
316
316
return false ;
317
317
}
318
-
318
+
319
319
if ( getPersister ().getInstrumentationMetadata ().isInstrumented () ) {
320
320
// the entity must be instrumented (otherwise we cant check dirty flag) and the dirty flag is false
321
321
return ! getPersister ().getInstrumentationMetadata ().extractInterceptor ( entity ).isDirty ();
322
322
}
323
-
323
+
324
324
return false ;
325
325
}
326
326
@@ -380,7 +380,7 @@ public void setReadOnly(boolean readOnly, Object entity) {
380
380
);
381
381
}
382
382
}
383
-
383
+
384
384
public String toString () {
385
385
return "EntityEntry" +
386
386
MessageHelper .infoString (entityName , id ) +
@@ -431,27 +431,27 @@ public void serialize(ObjectOutputStream oos) throws IOException {
431
431
*/
432
432
public static EntityEntry deserialize (
433
433
ObjectInputStream ois ,
434
- PersistenceContext persistenceContext ) throws IOException , ClassNotFoundException {
434
+ PersistenceContext persistenceContext ) throws IOException , ClassNotFoundException {
435
435
String previousStatusString ;
436
436
return new EntityEntry (
437
437
// this complexity comes from non-flushed changes, should really look at how that reattaches entries
438
438
( persistenceContext .getSession () == null ? null : persistenceContext .getSession ().getFactory () ),
439
- (String ) ois .readObject (),
439
+ (String ) ois .readObject (),
440
440
( Serializable ) ois .readObject (),
441
- EntityMode .parse ( (String ) ois .readObject () ),
441
+ EntityMode .parse ( (String ) ois .readObject () ),
442
442
(String ) ois .readObject (),
443
443
Status .valueOf ( (String ) ois .readObject () ),
444
444
( ( previousStatusString = ( String ) ois .readObject () ).length () == 0 ?
445
445
null :
446
446
Status .valueOf ( previousStatusString )
447
447
),
448
- ( Object [] ) ois .readObject (),
449
- ( Object [] ) ois .readObject (),
450
- ois .readObject (),
451
- LockMode .valueOf ( (String ) ois .readObject () ),
452
- ois .readBoolean (),
453
- ois .readBoolean (),
454
- ois .readBoolean (),
448
+ ( Object [] ) ois .readObject (),
449
+ ( Object [] ) ois .readObject (),
450
+ ois .readObject (),
451
+ LockMode .valueOf ( (String ) ois .readObject () ),
452
+ ois .readBoolean (),
453
+ ois .readBoolean (),
454
+ ois .readBoolean (),
455
455
persistenceContext
456
456
);
457
457
}
0 commit comments