Record Class EntityAttribute.AttributeHistory

java.lang.Object
java.lang.Record
com.tnsai.context.entity.EntityAttribute.AttributeHistory
Enclosing class:
EntityAttribute

public static record EntityAttribute.AttributeHistory(Object previousValue, String previousSourceId, Instant changedAt, String changeReason) extends Record
Historical record of attribute changes.
  • Constructor Summary

    Constructors
    Constructor
    Description
    AttributeHistory(Object previousValue, String previousSourceId, Instant changedAt, String changeReason)
    Creates an instance of a AttributeHistory record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the changedAt record component.
    Returns the value of the changeReason record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the previousSourceId record component.
    Returns the value of the previousValue record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • AttributeHistory

      public AttributeHistory(Object previousValue, String previousSourceId, Instant changedAt, String changeReason)
      Creates an instance of a AttributeHistory record class.
      Parameters:
      previousValue - the value for the previousValue record component
      previousSourceId - the value for the previousSourceId record component
      changedAt - the value for the changedAt record component
      changeReason - the value for the changeReason record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • previousValue

      public Object previousValue()
      Returns the value of the previousValue record component.
      Returns:
      the value of the previousValue record component
    • previousSourceId

      public String previousSourceId()
      Returns the value of the previousSourceId record component.
      Returns:
      the value of the previousSourceId record component
    • changedAt

      public Instant changedAt()
      Returns the value of the changedAt record component.
      Returns:
      the value of the changedAt record component
    • changeReason

      public String changeReason()
      Returns the value of the changeReason record component.
      Returns:
      the value of the changeReason record component