Class EntityExtendedImp

java.lang.Object
net.tangly.core.EntityExtendedImp
All Implemented Interfaces:
Entity, EntityExtended, HasComments, HasDateRange, HasId, HasName, HasOid, HasTags, HasText

public abstract class EntityExtendedImp extends Object implements EntityExtended
Default implementation of the EntityExtended interface. The unique object identifier shall be set at construction.
  • Constructor Details

    • EntityExtendedImp

      protected EntityExtendedImp(long oid)
  • Method Details

    • init

      public static <T extends MutableEntityExtended> T init(T entity, String id, String name, LocalDate from, LocalDate to, String text)
    • oid

      public long oid()
      Description copied from interface: HasOid
      Return the unique internal identifier of the instance.
      Specified by:
      oid in interface HasOid
      Returns:
      unique internal identifier
    • id

      public String id()
      Description copied from interface: HasId
      Return the unique external identifier of the instance.
      Specified by:
      id in interface HasId
      Returns:
      unique external identifier
    • name

      public String name()
      Specified by:
      name in interface HasName
    • range

      public DateRange range()
      Description copied from interface: HasDateRange
      Return the range of the mixin.
      Specified by:
      range in interface HasDateRange
      Returns:
      date range of the mixin
    • text

      public String text()
      Description copied from interface: HasText
      Return the human-readable text description of the instance.
      Specified by:
      text in interface HasText
      Returns:
      human-readable text description of the instance
    • comments

      public Collection<Comment> comments()
      Description copied from interface: HasComments
      Return the collection of comments owned by the entity.
      Specified by:
      comments in interface HasComments
      Returns:
      list of comments
    • tags

      public Collection<Tag> tags()
      Description copied from interface: HasTags
      Returns the collection of tags for the entity.
      Specified by:
      tags in interface HasTags
      Returns:
      collection of tags
    • hashCode

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

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