Class DefaultCommentDao
- java.lang.Object
-
- de.hybris.platform.comments.services.impl.DefaultCommentDao
-
- All Implemented Interfaces:
CommentDao,Dao
public class DefaultCommentDao extends java.lang.Object implements CommentDao
Default Comment DAO implementation.
-
-
Constructor Summary
Constructors Constructor Description DefaultCommentDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description 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 agesSearchResult<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 agesSearchResult<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 agesSearchResult<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 agesSearchResult<ReplyModel>findAllDirectReplies(CommentModel comment, int offset, int count)Deprecated, for removal: This API element is subject to removal in a future version.since agesprotected SearchResult<CommentModel>findAllInternal(UserModel user, java.util.Collection<ComponentModel> components, java.util.Collection<CommentTypeModel> types, ItemModel item, int offset, int count)java.util.List<CommentModel>findCommentsByItem(UserModel user, java.util.Collection<ComponentModel> components, ItemModel item, int offset, int count)Searches for all item comments related to the specified item, which are in the specified domain components and whereuseris a participant.java.util.List<CommentModel>findCommentsByItemAndType(UserModel user, java.util.Collection<ComponentModel> components, ItemModel item, java.util.Collection<CommentTypeModel> types, int offset, int count)Searches for all item comments related to the specified item, which are of the specified types, in the specified domain components and whereuseris a participant.java.util.List<CommentModel>findCommentsByType(UserModel user, java.util.Collection<ComponentModel> components, java.util.Collection<CommentTypeModel> types, int offset, int count)Searches for all comments of the specified types in the specified domain components whereuseris a participant.java.util.List<CommentModel>findCommentsByUser(UserModel user, java.util.Collection<ComponentModel> components, int offset, int count)Searches for all comments in the specified domain components whereuseris a participant i.e.java.util.List<ComponentModel>findComponentsByDomainAndCode(DomainModel domain, java.lang.String componentCode)Searches for components by domain and code.java.util.List<ReplyModel>findDirectRepliesByComment(CommentModel comment, int offset, int count)Searches for all direct comment replies i.e.java.util.List<DomainModel>findDomainsByCode(java.lang.String domainCode)Searches for domains by code.SearchResult<CommentUserSettingModel>findUserSettingByComment(UserModel user, AbstractCommentModel commentItem)Deprecated, for removal: This API element is subject to removal in a future version.since agesjava.util.List<CommentUserSettingModel>findUserSettingsByComment(UserModel user, AbstractCommentModel comment)Searches for the comments user settingprotected <T extends AbstractItemModel>
SearchResult<T>searchInternal(java.lang.String query, java.util.Map<java.lang.String,java.lang.Object> params, int offset, int count)voidsetFlexibleSearchService(FlexibleSearchService flexibleSearchService)
-
-
-
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 agesDescription copied from interface:CommentDaoSearches for all comments in the specified domain components whereuseris a participant i.e. where the user is either author, assignee or watcher.- Specified by:
findAllin interfaceCommentDao- Parameters:
user- comment participantcomponents- domain componentsoffset- search offsetcount- 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 agesDescription copied from interface:CommentDaoSearches for all item comments related to the specified item, which are in the specified domain components and whereuseris a participant.- Specified by:
findAllByItemin interfaceCommentDao- Parameters:
user- comment participantcomponents- domain componentsitem- related itemoffset- search offsetcount- 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 agesDescription copied from interface:CommentDaoSearches for all item comments related to the specified item, which are of the specified types, in the specified domain components and whereuseris a participant.- Specified by:
findAllByItemAndTypein interfaceCommentDao- Parameters:
user- comment participantcomponents- domain componentsitem- related itemtypes- comment typesoffset- search offsetcount- 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 agesDescription copied from interface:CommentDaoSearches for all comments of the specified types in the specified domain components whereuseris a participant.- Specified by:
findAllByTypein interfaceCommentDao- Parameters:
user- comment participantcomponents- domain componentstypes- comment typesoffset- search offsetcount- 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 agesDescription copied from interface:CommentDaoSearches for all direct comment replies i.e. all first level replies to the specified comment.- Specified by:
findAllDirectRepliesin interfaceCommentDao- Parameters:
comment- the commentoffset- search offsetcount- max hit count- Returns:
- all found direct replies in the specified range
-
findAllInternal
protected SearchResult<CommentModel> findAllInternal(UserModel user, java.util.Collection<ComponentModel> components, java.util.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 agesDescription copied from interface:CommentDaoSearches for the comments user setting- Specified by:
findUserSettingByCommentin interfaceCommentDao- Parameters:
user- comment participantcommentItem- the comment item- Returns:
- the user setting
-
searchInternal
protected <T extends AbstractItemModel> SearchResult<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:CommentDaoSearches for all item comments related to the specified item, which are in the specified domain components and whereuseris a participant.- Specified by:
findCommentsByItemin interfaceCommentDao- Parameters:
user- comment participantcomponents- domain componentsitem- related itemoffset- search offsetcount- 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:CommentDaoSearches for all item comments related to the specified item, which are of the specified types, in the specified domain components and whereuseris a participant.- Specified by:
findCommentsByItemAndTypein interfaceCommentDao- Parameters:
user- comment participantcomponents- domain componentsitem- related itemtypes- comment typesoffset- search offsetcount- 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:CommentDaoSearches for all comments of the specified types in the specified domain components whereuseris a participant.- Specified by:
findCommentsByTypein interfaceCommentDao- Parameters:
user- comment participantcomponents- domain componentstypes- comment typesoffset- search offsetcount- 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:CommentDaoSearches for all comments in the specified domain components whereuseris a participant i.e. where the user is either author, assignee or watcher.- Specified by:
findCommentsByUserin interfaceCommentDao- Parameters:
user- comment participantcomponents- domain componentsoffset- search offsetcount- 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:CommentDaoSearches for all direct comment replies i.e. all first level replies to the specified comment.- Specified by:
findDirectRepliesByCommentin interfaceCommentDao- Parameters:
comment- the commentoffset- search offsetcount- max hit count- Returns:
- all found direct replies in the specified range
-
findUserSettingsByComment
public java.util.List<CommentUserSettingModel> findUserSettingsByComment(UserModel user, AbstractCommentModel comment)
Description copied from interface:CommentDaoSearches for the comments user setting- Specified by:
findUserSettingsByCommentin interfaceCommentDao- Parameters:
user- comment participantcomment- the comment item- Returns:
- the user settings
-
setFlexibleSearchService
public void setFlexibleSearchService(FlexibleSearchService flexibleSearchService)
-
findComponentsByDomainAndCode
public java.util.List<ComponentModel> findComponentsByDomainAndCode(DomainModel domain, java.lang.String componentCode)
Description copied from interface:CommentDaoSearches for components by domain and code.- Specified by:
findComponentsByDomainAndCodein interfaceCommentDao
-
findDomainsByCode
public java.util.List<DomainModel> findDomainsByCode(java.lang.String domainCode)
Description copied from interface:CommentDaoSearches for domains by code.- Specified by:
findDomainsByCodein interfaceCommentDao
-
-