java.lang.Object
org.eclipse.persistence.internal.sessions.ChangeRecord
All Implemented Interfaces:
Serializable, ChangeRecord
Direct Known Subclasses:
AggregateChangeRecord, DeferrableChangeRecord, DirectToFieldChangeRecord, ObjectReferenceChangeRecord, TransformationMappingChangeRecord

public abstract class ChangeRecord extends Object implements Serializable, ChangeRecord

Purpose: This class was designed as a superclass to all possible Change Record types. These Change Records holds the changes made to the objects

See Also:
  • Field Details

    • attribute

      protected String attribute
      This is the attribute name that this change record represents
    • mapping

      protected transient DatabaseMapping mapping
      This attribute stores the mapping along with the attribute so that the mapping does not need to be looked up
    • owner

      protected ObjectChangeSet owner
      This is the object change set that holds this record
  • Constructor Details

    • ChangeRecord

      public ChangeRecord()
  • Method Details

    • getAttribute

      public String getAttribute()
      ADVANCED: Returns the name of the attribute this ChangeRecord Represents
      Specified by:
      getAttribute in interface ChangeRecord
      Returns:
      String
    • getMapping

      public DatabaseMapping getMapping()
      ADVANCED: Returns the mapping for the attribute this ChangeRecord Represents
    • getOwner

      public ObjectChangeSet getOwner()
      Description copied from interface: ChangeRecord
      ADVANCED: This method returns the ObjectChangeSet that references this ChangeRecord
      Specified by:
      getOwner in interface ChangeRecord
      Returns:
      org.eclipse.persistence.sessions.changesets.ObjectChangeSet
    • mergeRecord

      public abstract void mergeRecord(ChangeRecord mergeFromRecord, UnitOfWorkChangeSet mergeToChangeSet, UnitOfWorkChangeSet mergeFromChangeSet)
      INTERNAL: This method will be used to merge one record into another
    • prepareForSynchronization

      public void prepareForSynchronization(AbstractSession session)
      INTERNAL: Ensure this change record is ready to by sent remotely for cache synchronization In general, this means setting the CacheSynchronizationType on any ObjectChangeSets associated with this ChangeRecord
    • setAttribute

      public void setAttribute(String newValue)
      Sets the name of the attribute that this Record represents.
    • setMapping

      public void setMapping(DatabaseMapping mapping)
      Sets the mapping for the attribute that this Record represents
    • setOwner

      public void setOwner(ObjectChangeSet newOwner)
      INTERNAL: This method is used to set the ObjectChangeSet that uses this Record in that Record.
      Parameters:
      newOwner - The changeSet that uses this record.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • updateChangeRecordWithNewValue

      public void updateChangeRecordWithNewValue(Object newValue)
      INTERNAL: used by the record to update the new value ignores the value in the default implementation
    • updateReferences

      public abstract void updateReferences(UnitOfWorkChangeSet mergeToChangeSet, UnitOfWorkChangeSet mergeFromChangeSet)
      INTERNAL: This method will be used to update the objectsChangeSets references