Interface Auditable<U,ID,T extends TemporalAccessor>

Type Parameters:
U - the auditing type. Typically some kind of user.
ID - the type of the audited type's identifier
All Superinterfaces:
Persistable<ID>

public interface Auditable<U,ID,T extends TemporalAccessor> extends Persistable<ID>
Interface for auditable entities. Allows storing and retrieving creation and modification information. The changing instance (typically some user) is to be defined by a generics definition.
Author:
Oliver Gierke
  • Method Details

    • getCreatedBy

      Optional<U> getCreatedBy()
      Returns the user who created this entity.
      Returns:
      the createdBy
    • setCreatedBy

      void setCreatedBy(U createdBy)
      Sets the user who created this entity.
      Parameters:
      createdBy - the creating entity to set
    • getCreatedDate

      Optional<T> getCreatedDate()
      Returns the creation date of the entity.
      Returns:
      the createdDate
    • setCreatedDate

      void setCreatedDate(T creationDate)
      Sets the creation date of the entity.
      Parameters:
      creationDate - the creation date to set
    • getLastModifiedBy

      Optional<U> getLastModifiedBy()
      Returns the user who modified the entity lastly.
      Returns:
      the lastModifiedBy
    • setLastModifiedBy

      void setLastModifiedBy(U lastModifiedBy)
      Sets the user who modified the entity lastly.
      Parameters:
      lastModifiedBy - the last modifying entity to set
    • getLastModifiedDate

      Optional<T> getLastModifiedDate()
      Returns the date of the last modification.
      Returns:
      the lastModifiedDate
    • setLastModifiedDate

      void setLastModifiedDate(T lastModifiedDate)
      Sets the date of the last modification.
      Parameters:
      lastModifiedDate - the date of the last modification to set