Record Class AuditEntry<T>
java.lang.Object
java.lang.Record
org.hibernate.audit.AuditEntry<T>
- Type Parameters:
T- the entity type- Record Components:
entity- the entity snapshot after application of the changesetchangeset- the changelog entity (if configured) or changeset identifiermodificationType- the type of modification (ADD/MOD/DEL)
public record AuditEntry<T>(T entity, Object changeset, ModificationType modificationType)
extends Record
A tuple representing an entity at a specific changeset in
the audit history.
The changeset field holds:
- the changelog entity instance
(e.g.
DefaultChangelog), if one is configured, or - the plain changeset identifier
(e.g.
Instant,Integer) otherwise.
- Since:
- 7.4
-
Constructor Summary
ConstructorsConstructorDescriptionAuditEntry(T entity, Object changeset, ModificationType modificationType) Creates an instance of aAuditEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thechangesetrecord component.entity()Returns the value of theentityrecord 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 themodificationTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AuditEntry
Creates an instance of aAuditEntryrecord class.- Parameters:
entity- the value for theentityrecord componentchangeset- the value for thechangesetrecord componentmodificationType- the value for themodificationTyperecord component
-
-
Method Details
-
toString
-
hashCode
-
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). -
entity
-
changeset
-
modificationType
Returns the value of themodificationTyperecord component.- Returns:
- the value of the
modificationTyperecord component
-