Package com.tnsai.context.entity
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
ConstructorsConstructorDescriptionAttributeHistory(Object previousValue, String previousSourceId, Instant changedAt, String changeReason) Creates an instance of aAttributeHistoryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thechangedAtrecord component.Returns the value of thechangeReasonrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thepreviousSourceIdrecord component.Returns the value of thepreviousValuerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AttributeHistory
public AttributeHistory(Object previousValue, String previousSourceId, Instant changedAt, String changeReason) Creates an instance of aAttributeHistoryrecord class.- Parameters:
previousValue- the value for thepreviousValuerecord componentpreviousSourceId- the value for thepreviousSourceIdrecord componentchangedAt- the value for thechangedAtrecord componentchangeReason- the value for thechangeReasonrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
previousValue
Returns the value of thepreviousValuerecord component.- Returns:
- the value of the
previousValuerecord component
-
previousSourceId
Returns the value of thepreviousSourceIdrecord component.- Returns:
- the value of the
previousSourceIdrecord component
-
changedAt
Returns the value of thechangedAtrecord component.- Returns:
- the value of the
changedAtrecord component
-
changeReason
Returns the value of thechangeReasonrecord component.- Returns:
- the value of the
changeReasonrecord component
-