Class UniqueObject

java.lang.Object
de.digitalcollections.model.UniqueObject
Direct Known Subclasses:
Headword, Identifiable, Identifier, IdentifierType, License, Predicate, RenderingTemplate, Tag, UrlAlias, User

public abstract class UniqueObject extends Object
An unique model object being identifiable and referencable by its universal unique UUID.
  • Field Details

  • Constructor Details

    • UniqueObject

      public UniqueObject()
  • Method Details

    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getCreated

      public LocalDateTime getCreated()
      Returns:
      the creation date of the object
    • getLastModified

      public LocalDateTime getLastModified()
      Returns:
      the date of last modification of the object
    • getUuid

      public UUID getUuid()
      Returns:
      the universal unique id of the object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • init

      protected void init()
      Use to initialize member variables, used by default constructor and builder
    • isPersisted

      public boolean isPersisted()
      check if the technical system fields uuid, created, lastModified are filled, what is the indicator for "has been persisted in system".
      Returns:
      true if unique object has been persisted already
    • setCreated

      public void setCreated(LocalDateTime created)
      Parameters:
      created - the creation date of the object
    • setLastModified

      public void setLastModified(LocalDateTime lastModified)
      Parameters:
      lastModified - the date of last modification of the object
    • setUuid

      public void setUuid(UUID uuid)
      Parameters:
      uuid - the universal unique id of the object