HHH-8984 EntityEntry slimming: remove EntityMode and tenantId fields
This commit is contained in:
parent
5bdef580bd
commit
70a7c7a821
|
@ -503,8 +503,6 @@ public class StatefulPersistenceContext implements PersistenceContext {
|
||||||
lockMode,
|
lockMode,
|
||||||
existsInDatabase,
|
existsInDatabase,
|
||||||
persister,
|
persister,
|
||||||
persister.getEntityMode(),
|
|
||||||
session.getTenantIdentifier(),
|
|
||||||
disableVersionIncrement,
|
disableVersionIncrement,
|
||||||
lazyPropertiesAreUnfetched,
|
lazyPropertiesAreUnfetched,
|
||||||
this
|
this
|
||||||
|
|
|
@ -53,8 +53,6 @@ public final class EntityEntry implements Serializable {
|
||||||
private boolean existsInDatabase;
|
private boolean existsInDatabase;
|
||||||
private Object version;
|
private Object version;
|
||||||
private transient EntityPersister persister;
|
private transient EntityPersister persister;
|
||||||
private final EntityMode entityMode;
|
|
||||||
private final String tenantId;
|
|
||||||
private final String entityName;
|
private final String entityName;
|
||||||
// cached EntityKey (lazy-initialized)
|
// cached EntityKey (lazy-initialized)
|
||||||
private transient EntityKey cachedEntityKey;
|
private transient EntityKey cachedEntityKey;
|
||||||
|
@ -73,8 +71,6 @@ public final class EntityEntry implements Serializable {
|
||||||
final LockMode lockMode,
|
final LockMode lockMode,
|
||||||
final boolean existsInDatabase,
|
final boolean existsInDatabase,
|
||||||
final EntityPersister persister,
|
final EntityPersister persister,
|
||||||
final EntityMode entityMode,
|
|
||||||
final String tenantId,
|
|
||||||
final boolean disableVersionIncrement,
|
final boolean disableVersionIncrement,
|
||||||
final boolean lazyPropertiesAreUnfetched,
|
final boolean lazyPropertiesAreUnfetched,
|
||||||
final PersistenceContext persistenceContext) {
|
final PersistenceContext persistenceContext) {
|
||||||
|
@ -92,8 +88,6 @@ public final class EntityEntry implements Serializable {
|
||||||
this.isBeingReplicated=disableVersionIncrement;
|
this.isBeingReplicated=disableVersionIncrement;
|
||||||
this.loadedWithLazyPropertiesUnfetched = lazyPropertiesAreUnfetched;
|
this.loadedWithLazyPropertiesUnfetched = lazyPropertiesAreUnfetched;
|
||||||
this.persister=persister;
|
this.persister=persister;
|
||||||
this.entityMode = entityMode;
|
|
||||||
this.tenantId = tenantId;
|
|
||||||
this.entityName = persister == null ? null : persister.getEntityName();
|
this.entityName = persister == null ? null : persister.getEntityName();
|
||||||
this.persistenceContext = persistenceContext;
|
this.persistenceContext = persistenceContext;
|
||||||
}
|
}
|
||||||
|
@ -106,8 +100,6 @@ public final class EntityEntry implements Serializable {
|
||||||
final SessionFactoryImplementor factory,
|
final SessionFactoryImplementor factory,
|
||||||
final String entityName,
|
final String entityName,
|
||||||
final Serializable id,
|
final Serializable id,
|
||||||
final EntityMode entityMode,
|
|
||||||
final String tenantId,
|
|
||||||
final Status status,
|
final Status status,
|
||||||
final Status previousStatus,
|
final Status previousStatus,
|
||||||
final Object[] loadedState,
|
final Object[] loadedState,
|
||||||
|
@ -121,8 +113,6 @@ public final class EntityEntry implements Serializable {
|
||||||
this.entityName = entityName;
|
this.entityName = entityName;
|
||||||
this.persister = ( factory == null ? null : factory.getEntityPersister( entityName ) );
|
this.persister = ( factory == null ? null : factory.getEntityPersister( entityName ) );
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.entityMode = entityMode;
|
|
||||||
this.tenantId = tenantId;
|
|
||||||
this.status = status;
|
this.status = status;
|
||||||
this.previousStatus = previousStatus;
|
this.previousStatus = previousStatus;
|
||||||
this.loadedState = loadedState;
|
this.loadedState = loadedState;
|
||||||
|
@ -410,8 +400,6 @@ public final class EntityEntry implements Serializable {
|
||||||
public void serialize(ObjectOutputStream oos) throws IOException {
|
public void serialize(ObjectOutputStream oos) throws IOException {
|
||||||
oos.writeObject( entityName );
|
oos.writeObject( entityName );
|
||||||
oos.writeObject( id );
|
oos.writeObject( id );
|
||||||
oos.writeObject( entityMode.toString() );
|
|
||||||
oos.writeObject( tenantId );
|
|
||||||
oos.writeObject( status.name() );
|
oos.writeObject( status.name() );
|
||||||
oos.writeObject( (previousStatus == null ? "" : previousStatus.name()) );
|
oos.writeObject( (previousStatus == null ? "" : previousStatus.name()) );
|
||||||
// todo : potentially look at optimizing these two arrays
|
// todo : potentially look at optimizing these two arrays
|
||||||
|
@ -445,8 +433,6 @@ public final class EntityEntry implements Serializable {
|
||||||
persistenceContext.getSession().getFactory(),
|
persistenceContext.getSession().getFactory(),
|
||||||
(String) ois.readObject(),
|
(String) ois.readObject(),
|
||||||
(Serializable) ois.readObject(),
|
(Serializable) ois.readObject(),
|
||||||
EntityMode.parse( (String) ois.readObject() ),
|
|
||||||
(String) ois.readObject(),
|
|
||||||
Status.valueOf( (String) ois.readObject() ),
|
Status.valueOf( (String) ois.readObject() ),
|
||||||
( previousStatusString = (String) ois.readObject() ).length() == 0
|
( previousStatusString = (String) ois.readObject() ).length() == 0
|
||||||
? null
|
? null
|
||||||
|
|
|
@ -304,8 +304,6 @@ public class EnhancerTest extends BaseUnitTestCase {
|
||||||
LockMode.NONE,
|
LockMode.NONE,
|
||||||
false,
|
false,
|
||||||
null,
|
null,
|
||||||
EntityMode.POJO,
|
|
||||||
null,
|
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
null
|
null
|
||||||
|
|
|
@ -263,8 +263,6 @@ public class CustomerEnhancerTest extends BaseUnitTestCase {
|
||||||
LockMode.NONE,
|
LockMode.NONE,
|
||||||
false,
|
false,
|
||||||
null,
|
null,
|
||||||
EntityMode.POJO,
|
|
||||||
null,
|
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
null
|
null
|
||||||
|
|
Loading…
Reference in New Issue