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