Class AuditLogChange


  • public class AuditLogChange
    extends Object
    Plain-Old-Java-Object (POJO) representing a single change for an AuditLogEntry!
    This object holds the old- and new value for the updated field. The field is specified by the key.
    • Constructor Detail

      • AuditLogChange

        public AuditLogChange​(Object oldValue,
                              Object newValue,
                              String key)
    • Method Detail

      • getOldValue

        @Nullable
        public <T> T getOldValue()
        The previous value for the field specified by getKey().
        Type Parameters:
        T - The expected generic type for this value.
        This will be used to cast the value.
        Returns:
        The old value
        Throws:
        ClassCastException - If the type cast to the generic type fails
      • getNewValue

        @Nullable
        public <T> T getNewValue()
        The updated value for the field specified by getKey().
        Type Parameters:
        T - The expected generic type for this value.
        This will be used to cast the value.
        Returns:
        The new value
        Throws:
        ClassCastException - If the type cast to the generic type fails
      • getKey

        @Nonnull
        public String getKey()
        The key which defines the field that was updated by this change
        Returns:
        The key
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object