Class DefaultCommentDao

  • All Implemented Interfaces:
    CommentDao, Dao

    public class DefaultCommentDao
    extends java.lang.Object
    implements CommentDao
    Default Comment DAO implementation.
    • Constructor Detail

      • DefaultCommentDao

        public DefaultCommentDao()
    • Method Detail

      • findAll

        @Deprecated(since="ages",
                    forRemoval=true)
        public SearchResult<CommentModel> findAll​(UserModel user,
                                                  java.util.Collection<ComponentModel> components,
                                                  int offset,
                                                  int count)
        Deprecated, for removal: This API element is subject to removal in a future version.
        since ages
        Description copied from interface: CommentDao
        Searches for all comments in the specified domain components where user is a participant i.e. where the user is either author, assignee or watcher.
        Specified by:
        findAll in interface CommentDao
        Parameters:
        user - comment participant
        components - domain components
        offset - search offset
        count - max hit count
        Returns:
        all found comments in the specified range
      • findAllByItem

        @Deprecated(since="ages",
                    forRemoval=true)
        public SearchResult<CommentModel> findAllByItem​(UserModel user,
                                                        java.util.Collection<ComponentModel> components,
                                                        ItemModel item,
                                                        int offset,
                                                        int count)
        Deprecated, for removal: This API element is subject to removal in a future version.
        since ages
        Description copied from interface: CommentDao
        Searches for all item comments related to the specified item, which are in the specified domain components and where user is a participant.
        Specified by:
        findAllByItem in interface CommentDao
        Parameters:
        user - comment participant
        components - domain components
        item - related item
        offset - search offset
        count - max hit count
        Returns:
        all found comments in the specified range
      • findAllByItemAndType

        @Deprecated(since="ages",
                    forRemoval=true)
        public SearchResult<CommentModel> findAllByItemAndType​(UserModel user,
                                                               java.util.Collection<ComponentModel> components,
                                                               ItemModel item,
                                                               java.util.Collection<CommentTypeModel> types,
                                                               int offset,
                                                               int count)
        Deprecated, for removal: This API element is subject to removal in a future version.
        since ages
        Description copied from interface: CommentDao
        Searches for all item comments related to the specified item, which are of the specified types, in the specified domain components and where user is a participant.
        Specified by:
        findAllByItemAndType in interface CommentDao
        Parameters:
        user - comment participant
        components - domain components
        item - related item
        types - comment types
        offset - search offset
        count - max hit count
        Returns:
        all found comments in the specified range
      • findAllByType

        @Deprecated(since="ages",
                    forRemoval=true)
        public SearchResult<CommentModel> findAllByType​(UserModel user,
                                                        java.util.Collection<ComponentModel> components,
                                                        java.util.Collection<CommentTypeModel> types,
                                                        int offset,
                                                        int count)
        Deprecated, for removal: This API element is subject to removal in a future version.
        since ages
        Description copied from interface: CommentDao
        Searches for all comments of the specified types in the specified domain components where user is a participant.
        Specified by:
        findAllByType in interface CommentDao
        Parameters:
        user - comment participant
        components - domain components
        types - comment types
        offset - search offset
        count - max hit count
        Returns:
        all found comments in the specified range
      • findAllDirectReplies

        @Deprecated(since="ages",
                    forRemoval=true)
        public SearchResult<ReplyModel> findAllDirectReplies​(CommentModel comment,
                                                             int offset,
                                                             int count)
        Deprecated, for removal: This API element is subject to removal in a future version.
        since ages
        Description copied from interface: CommentDao
        Searches for all direct comment replies i.e. all first level replies to the specified comment.
        Specified by:
        findAllDirectReplies in interface CommentDao
        Parameters:
        comment - the comment
        offset - search offset
        count - max hit count
        Returns:
        all found direct replies in the specified range
      • searchInternal

        protected <T extends AbstractItemModelSearchResult<T> searchInternal​(java.lang.String query,
                                                                               java.util.Map<java.lang.String,​java.lang.Object> params,
                                                                               int offset,
                                                                               int count)
      • findCommentsByItem

        public java.util.List<CommentModel> findCommentsByItem​(UserModel user,
                                                               java.util.Collection<ComponentModel> components,
                                                               ItemModel item,
                                                               int offset,
                                                               int count)
        Description copied from interface: CommentDao
        Searches for all item comments related to the specified item, which are in the specified domain components and where user is a participant.
        Specified by:
        findCommentsByItem in interface CommentDao
        Parameters:
        user - comment participant
        components - domain components
        item - related item
        offset - search offset
        count - max hit count
        Returns:
        all found comments in the specified range
      • findCommentsByItemAndType

        public java.util.List<CommentModel> findCommentsByItemAndType​(UserModel user,
                                                                      java.util.Collection<ComponentModel> components,
                                                                      ItemModel item,
                                                                      java.util.Collection<CommentTypeModel> types,
                                                                      int offset,
                                                                      int count)
        Description copied from interface: CommentDao
        Searches for all item comments related to the specified item, which are of the specified types, in the specified domain components and where user is a participant.
        Specified by:
        findCommentsByItemAndType in interface CommentDao
        Parameters:
        user - comment participant
        components - domain components
        item - related item
        types - comment types
        offset - search offset
        count - max hit count
        Returns:
        all found comments in the specified range
      • findCommentsByType

        public java.util.List<CommentModel> findCommentsByType​(UserModel user,
                                                               java.util.Collection<ComponentModel> components,
                                                               java.util.Collection<CommentTypeModel> types,
                                                               int offset,
                                                               int count)
        Description copied from interface: CommentDao
        Searches for all comments of the specified types in the specified domain components where user is a participant.
        Specified by:
        findCommentsByType in interface CommentDao
        Parameters:
        user - comment participant
        components - domain components
        types - comment types
        offset - search offset
        count - max hit count
        Returns:
        all found comments in the specified range
      • findCommentsByUser

        public java.util.List<CommentModel> findCommentsByUser​(UserModel user,
                                                               java.util.Collection<ComponentModel> components,
                                                               int offset,
                                                               int count)
        Description copied from interface: CommentDao
        Searches for all comments in the specified domain components where user is a participant i.e. where the user is either author, assignee or watcher.
        Specified by:
        findCommentsByUser in interface CommentDao
        Parameters:
        user - comment participant
        components - domain components
        offset - search offset
        count - max hit count
        Returns:
        all found comments in the specified range
      • findDirectRepliesByComment

        public java.util.List<ReplyModel> findDirectRepliesByComment​(CommentModel comment,
                                                                     int offset,
                                                                     int count)
        Description copied from interface: CommentDao
        Searches for all direct comment replies i.e. all first level replies to the specified comment.
        Specified by:
        findDirectRepliesByComment in interface CommentDao
        Parameters:
        comment - the comment
        offset - search offset
        count - max hit count
        Returns:
        all found direct replies in the specified range
      • setFlexibleSearchService

        public void setFlexibleSearchService​(FlexibleSearchService flexibleSearchService)
      • findDomainsByCode

        public java.util.List<DomainModel> findDomainsByCode​(java.lang.String domainCode)
        Description copied from interface: CommentDao
        Searches for domains by code.
        Specified by:
        findDomainsByCode in interface CommentDao