Class ObjectChangeSet

java.lang.Object
cz.cvut.kbss.jopa.sessions.change.ObjectChangeSet
All Implemented Interfaces:
Change

public class ObjectChangeSet extends Object implements Change
  • Constructor Details

  • Method Details

    • addChangeRecord

      public void addChangeRecord(ChangeRecord record)
      Adds a new change record to this change set.

      If there was a change for attribute represented by the new record, it will be overwritten.

      Parameters:
      record - The record to add
    • getChanges

      public Set<ChangeRecord> getChanges()
      Gets changes held in this change set.
      Returns:
      Set of changes
    • hasChanges

      public boolean hasChanges()
      Whether this change set contains any changes.
      Returns:
      true if there are any changes in this change set, false otherwise
    • getOriginal

      public Object getOriginal()
      Description copied from interface: Change
      Gets the original object.
      Specified by:
      getOriginal in interface Change
      Returns:
      Original
    • getClone

      public Object getClone()
      Description copied from interface: Change
      Gets the clone with changes.
      Specified by:
      getClone in interface Change
      Returns:
      Clone, never null
    • getDescriptor

      public Descriptor getDescriptor()
      Description copied from interface: Change
      Gets descriptor of the changed object.
      Specified by:
      getDescriptor in interface Change
      Returns:
      Instance descriptor