Class DefaultCommentDao
java.lang.Object
de.hybris.platform.comments.services.impl.DefaultCommentDao
- All Implemented Interfaces:
CommentDao,Dao
Default Comment DAO implementation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindAll(UserModel user, Collection<ComponentModel> components, int offset, int count) Deprecated, for removal: This API element is subject to removal in a future version.since agesfindAllByItem(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 agesfindAllByItemAndType(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 agesfindAllByType(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 agesfindAllDirectReplies(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, Collection<ComponentModel> components, Collection<CommentTypeModel> types, ItemModel item, int offset, int count) findCommentsByItem(UserModel user, 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.findCommentsByItemAndType(UserModel user, Collection<ComponentModel> components, ItemModel item, 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.findCommentsByType(UserModel user, Collection<ComponentModel> components, Collection<CommentTypeModel> types, int offset, int count) Searches for all comments of the specified types in the specified domain components whereuseris a participant.findCommentsByUser(UserModel user, Collection<ComponentModel> components, int offset, int count) Searches for all comments in the specified domain components whereuseris a participant i.e.findComponentsByDomainAndCode(DomainModel domain, String componentCode) Searches for components by domain and code.findDirectRepliesByComment(CommentModel comment, int offset, int count) Searches for all direct comment replies i.e.findDomainsByCode(String domainCode) Searches for domains by code.findUserSettingByComment(UserModel user, AbstractCommentModel commentItem) Deprecated, for removal: This API element is subject to removal in a future version.since agesfindUserSettingsByComment(UserModel user, AbstractCommentModel comment) Searches for the comments user settingprotected <T extends AbstractItemModel>
SearchResult<T>searchInternal(String query, Map<String, Object> params, int offset, int count) voidsetFlexibleSearchService(FlexibleSearchService flexibleSearchService)
-
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 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, 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, 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 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, 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 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, 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 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(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: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 List<CommentModel> findCommentsByItemAndType(UserModel user, Collection<ComponentModel> components, ItemModel item, 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 List<CommentModel> findCommentsByType(UserModel user, Collection<ComponentModel> components, 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 List<CommentModel> findCommentsByUser(UserModel user, 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
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 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
-
findComponentsByDomainAndCode
Description copied from interface:CommentDaoSearches for components by domain and code.- Specified by:
findComponentsByDomainAndCodein interfaceCommentDao
-
findDomainsByCode
Description copied from interface:CommentDaoSearches for domains by code.- Specified by:
findDomainsByCodein interfaceCommentDao
-