Interface HasComments

All Known Subinterfaces:
EntityExtended, ExternalEntity, HasMutableComments, MutableEntityExtended, MutableExternalEntity
All Known Implementing Classes:
EntityExtendedImp, ExternalEntityImp, MutableEntityExtendedImp, MutableExternalEntityImp

public interface HasComments
Defines a mixin and abstracts an entity with comments.
  • Method Details

    • comments

      Collection<Comment> comments()
      Return the collection of comments owned by the entity.
      Returns:
      list of comments
    • findByAuthor

      default List<Comment> findByAuthor(@NotNull @NotNull String author)
      Return the comments authored by the given author.
      Parameters:
      author - author of the searched comment
      Returns:
      list of requested comments
    • findByTag

      default List<Comment> findByTag(String namespace, String name)
      Return the comments having the given tag.
      Parameters:
      namespace - namespace of the tag
      name - name of the tag
      Returns:
      list of the requested comments
    • findByTime

      default List<Comment> findByTime(LocalDateTime from, LocalDateTime to)
      Return all the comments which creation date is in the closed interval.
      Parameters:
      from - beginning of the time interval or LocalDateTime.MIN
      to - end of the time interval or LocalDateTime.MAX
      Returns:
      list of requested comments