Class DefaultCommentDao

java.lang.Object
de.hybris.platform.comments.services.impl.DefaultCommentDao
All Implemented Interfaces:
CommentDao, Dao

public class DefaultCommentDao extends Object implements CommentDao
Default Comment DAO implementation.
  • Constructor Details

    • DefaultCommentDao

      public DefaultCommentDao()
  • Method Details

    • findAll

      @Deprecated(since="ages", forRemoval=true) public SearchResult<CommentModel> findAll(UserModel user, 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, 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, Collection<ComponentModel> components, ItemModel item, 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, Collection<ComponentModel> components, 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
    • findAllInternal

      protected SearchResult<CommentModel> findAllInternal(UserModel user, Collection<ComponentModel> components, Collection<CommentTypeModel> types, ItemModel item, int offset, int count)
    • findUserSettingByComment

      @Deprecated(since="ages", forRemoval=true) public SearchResult<CommentUserSettingModel> findUserSettingByComment(UserModel user, AbstractCommentModel commentItem)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since ages
      Description copied from interface: CommentDao
      Searches for the comments user setting
      Specified by:
      findUserSettingByComment in interface CommentDao
      Parameters:
      user - comment participant
      commentItem - the comment item
      Returns:
      the user setting
    • searchInternal

      protected <T extends AbstractItemModel> SearchResult<T> searchInternal(String query, Map<String,Object> params, int offset, int count)
    • findCommentsByItem

      public List<CommentModel> findCommentsByItem(UserModel user, 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 List<CommentModel> findCommentsByItemAndType(UserModel user, Collection<ComponentModel> components, ItemModel item, 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 List<CommentModel> findCommentsByType(UserModel user, Collection<ComponentModel> components, 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 List<CommentModel> findCommentsByUser(UserModel user, 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 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
    • findUserSettingsByComment

      public List<CommentUserSettingModel> findUserSettingsByComment(UserModel user, AbstractCommentModel comment)
      Description copied from interface: CommentDao
      Searches for the comments user setting
      Specified by:
      findUserSettingsByComment in interface CommentDao
      Parameters:
      user - comment participant
      comment - the comment item
      Returns:
      the user settings
    • setFlexibleSearchService

      public void setFlexibleSearchService(FlexibleSearchService flexibleSearchService)
    • findComponentsByDomainAndCode

      public List<ComponentModel> findComponentsByDomainAndCode(DomainModel domain, String componentCode)
      Description copied from interface: CommentDao
      Searches for components by domain and code.
      Specified by:
      findComponentsByDomainAndCode in interface CommentDao
    • findDomainsByCode

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