HHH-8984 EntityEntry slimming: remove EntityMode and tenantId fields

This commit is contained in:
Sanne Grinovero 2014-02-24 16:47:29 +00:00
parent f0bf53e40e
commit 86ab291257
4 changed files with 0 additions and 21 deletions

View File

@ -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

View File

@ -29,7 +29,6 @@ import java.io.ObjectOutputStream;
import java.io.Serializable; import java.io.Serializable;
import org.hibernate.CustomEntityDirtinessStrategy; import org.hibernate.CustomEntityDirtinessStrategy;
import org.hibernate.EntityMode;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.LockMode; import org.hibernate.LockMode;
import org.hibernate.Session; import org.hibernate.Session;
@ -53,8 +52,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 +70,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 +87,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 +99,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 +112,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 +399,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 +432,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

View File

@ -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

View File

@ -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