Class MutableExternalEntityImp

java.lang.Object
net.tangly.core.MutableExternalEntityImp
  • Constructor Details

    • MutableExternalEntityImp

      protected MutableExternalEntityImp(@NotNull @NotNull String id)
  • Method Details

    • 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
    • id

      public void id(@NotNull @NotNull String id)
      Description copied from interface: HasMutableId
      Set the identifier of the instance.
      Specified by:
      id in interface HasMutableId
      Parameters:
      id - new ID of the instance.
    • name

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

      public void name(String name)
      Specified by:
      name in interface HasMutableName
    • 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
    • text

      public void text(String text)
      Description copied from interface: HasMutableText
      Set the text description of the entity.
      Specified by:
      text in interface HasMutableText
      Parameters:
      text - human readable text description
      See Also:
    • date

      public LocalDate date()
      Description copied from interface: HasDate
      Returns the date of entity.
      Specified by:
      date in interface HasDate
      Returns:
      the date of the entity
    • date

      public void date(LocalDate date)
      Description copied from interface: HasMutableDate
      Set the new date of the entity.
      Specified by:
      date in interface HasMutableDate
      Parameters:
      date - new date of the entity
      See Also:
    • 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
    • comments

      public void comments(Collection<Comment> comments)
      Description copied from interface: HasMutableComments
      Set the new collection of comments.
      Specified by:
      comments in interface HasMutableComments
      Parameters:
      comments - new collection of comments
      See Also:
    • add

      public void add(@NotNull @NotNull Comment comment)
      Description copied from interface: HasMutableComments
      Adds a comment to the list of comments.
      Specified by:
      add in interface HasMutableComments
      Parameters:
      comment - comment to be added, cannot be null
    • remove

      public void remove(@NotNull @NotNull Comment comment)
      Description copied from interface: HasMutableComments
      Remove the given comment from the list of comments.
      Specified by:
      remove in interface HasMutableComments
      Parameters:
      comment - comment to be removed, cannot be null
    • 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
    • tags

      public void tags(@NotNull @NotNull Collection<Tag> tags)
      Description copied from interface: HasMutableTags
      Set the new collection of tags for the entity.
      Specified by:
      tags in interface HasMutableTags
      Parameters:
      tags - new collection of tags
      See Also:
    • clear

      public void clear()
      Specified by:
      clear in interface HasMutableTags
    • add

      public boolean add(@NotNull @NotNull Tag tag)
      Description copied from interface: HasMutableTags
      Add the tag to the collection of tags.
      Specified by:
      add in interface HasMutableTags
      Parameters:
      tag - tag to be added
      Returns:
      true if this collection did not already contain the specified element
      See Also:
    • remove

      public boolean remove(@NotNull @NotNull Tag tag)
      Description copied from interface: HasMutableTags
      Remove the tag from the collection of tags.
      Specified by:
      remove in interface HasMutableTags
      Parameters:
      tag - tag to remove
      Returns:
      true if this collection contained the specified element
      See Also:
    • hashCode

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

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