Class AuditLogChange


  • public class AuditLogChange
    extends java.lang.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 Summary

      Constructors 
      Constructor Description
      AuditLogChange​(java.lang.Object oldValue, java.lang.Object newValue, java.lang.String key)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.lang.String getKey()
      The key which defines the field that was updated by this change
      <T> T getNewValue()
      The updated value for the field specified by getKey().
      <T> T getOldValue()
      The previous value for the field specified by getKey().
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AuditLogChange

        public AuditLogChange​(java.lang.Object oldValue,
                              java.lang.Object newValue,
                              java.lang.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:
        java.lang.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:
        java.lang.ClassCastException - If the type cast to the generic type fails
      • getKey

        @Nonnull
        public java.lang.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 java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object