java.lang.Object
com.commercetools.history.models.change_history.RecordImpl
All Implemented Interfaces:
Record, io.vrap.rmf.base.client.ModelBase

public class RecordImpl extends Object implements Record, io.vrap.rmf.base.client.ModelBase

Captures the differences between the previous and next version of a resource.

The maximum number of Records that can be stored and their retention period are subject to a limit.

  • Constructor Details

    • RecordImpl

      public RecordImpl()
      create empty instance
  • Method Details

    • getVersion

      public Integer getVersion()

      Version of the resource after the change.

      For more information on how the version is incremented, see Optimistic Concurrency Control.

      Specified by:
      getVersion in interface Record
      Returns:
      version
    • getPreviousVersion

      public Integer getPreviousVersion()

      Version of the resource before the change.

      Specified by:
      getPreviousVersion in interface Record
      Returns:
      previousVersion
    • getType

      public String getType()

      Indicates the type of change. For creation, update, or deletion, the value is "ResourceCreated", "ResourceUpdated", or "ResourceDeleted" respectively.

      Specified by:
      getType in interface Record
      Returns:
      type
    • getModifiedBy

      public ModifiedBy getModifiedBy()

      Information about the user or API Client who performed the change.

      Specified by:
      getModifiedBy in interface Record
      Returns:
      modifiedBy
    • getModifiedAt

      public String getModifiedAt()

      Date and time (UTC) the change was made.

      Specified by:
      getModifiedAt in interface Record
      Returns:
      modifiedAt
    • getLabel

      public Label getLabel()

      Information that describes the resource after the change.

      Specified by:
      getLabel in interface Record
      Returns:
      label
    • getPreviousLabel

      public Label getPreviousLabel()

      Information that describes the resource before the change.

      Specified by:
      getPreviousLabel in interface Record
      Returns:
      previousLabel
    • getChanges

      public List<Change> getChanges()

      Shows the differences in the resource between previousVersion and version.

      The value is not identical to the actual array of update actions sent and is not limited to update actions (see, for example, Optimistic Concurrency Control).

      Specified by:
      getChanges in interface Record
      Returns:
      changes
    • getResource

      public ResourceIdentifier getResource()

      ResourceIdentifier of the changed resource.

      Specified by:
      getResource in interface Record
      Returns:
      resource
    • getStores

      public List<KeyReference> getStores()

      References to the Stores associated with the Change.

      Specified by:
      getStores in interface Record
      Returns:
      stores
    • getBusinessUnit

      public KeyReference getBusinessUnit()

      Reference to the Business Unit associated with the Change.

      Specified by:
      getBusinessUnit in interface Record
      Returns:
      businessUnit
    • getWithoutChanges

      public Boolean getWithoutChanges()

      true if no change was detected.

      The version number of the resource can be increased even without any change in the resource.

      Specified by:
      getWithoutChanges in interface Record
      Returns:
      withoutChanges
    • setVersion

      public void setVersion(Integer version)
      Description copied from interface: Record

      Version of the resource after the change.

      For more information on how the version is incremented, see Optimistic Concurrency Control.

      Specified by:
      setVersion in interface Record
      Parameters:
      version - value to be set
    • setPreviousVersion

      public void setPreviousVersion(Integer previousVersion)
      Description copied from interface: Record

      Version of the resource before the change.

      Specified by:
      setPreviousVersion in interface Record
      Parameters:
      previousVersion - value to be set
    • setType

      public void setType(String type)
      Description copied from interface: Record

      Indicates the type of change. For creation, update, or deletion, the value is "ResourceCreated", "ResourceUpdated", or "ResourceDeleted" respectively.

      Specified by:
      setType in interface Record
      Parameters:
      type - value to be set
    • setModifiedBy

      public void setModifiedBy(ModifiedBy modifiedBy)
      Description copied from interface: Record

      Information about the user or API Client who performed the change.

      Specified by:
      setModifiedBy in interface Record
      Parameters:
      modifiedBy - value to be set
    • setModifiedAt

      public void setModifiedAt(String modifiedAt)
      Description copied from interface: Record

      Date and time (UTC) the change was made.

      Specified by:
      setModifiedAt in interface Record
      Parameters:
      modifiedAt - value to be set
    • setLabel

      public void setLabel(Label label)
      Description copied from interface: Record

      Information that describes the resource after the change.

      Specified by:
      setLabel in interface Record
      Parameters:
      label - value to be set
    • setPreviousLabel

      public void setPreviousLabel(Label previousLabel)
      Description copied from interface: Record

      Information that describes the resource before the change.

      Specified by:
      setPreviousLabel in interface Record
      Parameters:
      previousLabel - value to be set
    • setChanges

      public void setChanges(Change... changes)
      Description copied from interface: Record

      Shows the differences in the resource between previousVersion and version.

      The value is not identical to the actual array of update actions sent and is not limited to update actions (see, for example, Optimistic Concurrency Control).

      Specified by:
      setChanges in interface Record
      Parameters:
      changes - values to be set
    • setChanges

      public void setChanges(List<Change> changes)
      Description copied from interface: Record

      Shows the differences in the resource between previousVersion and version.

      The value is not identical to the actual array of update actions sent and is not limited to update actions (see, for example, Optimistic Concurrency Control).

      Specified by:
      setChanges in interface Record
      Parameters:
      changes - values to be set
    • setResource

      public void setResource(ResourceIdentifier resource)
      Description copied from interface: Record

      ResourceIdentifier of the changed resource.

      Specified by:
      setResource in interface Record
      Parameters:
      resource - value to be set
    • setStores

      public void setStores(KeyReference... stores)
      Description copied from interface: Record

      References to the Stores associated with the Change.

      Specified by:
      setStores in interface Record
      Parameters:
      stores - values to be set
    • setStores

      public void setStores(List<KeyReference> stores)
      Description copied from interface: Record

      References to the Stores associated with the Change.

      Specified by:
      setStores in interface Record
      Parameters:
      stores - values to be set
    • setBusinessUnit

      public void setBusinessUnit(KeyReference businessUnit)
      Description copied from interface: Record

      Reference to the Business Unit associated with the Change.

      Specified by:
      setBusinessUnit in interface Record
      Parameters:
      businessUnit - value to be set
    • setWithoutChanges

      public void setWithoutChanges(Boolean withoutChanges)
      Description copied from interface: Record

      true if no change was detected.

      The version number of the resource can be increased even without any change in the resource.

      Specified by:
      setWithoutChanges in interface Record
      Parameters:
      withoutChanges - value to be set
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object