Interface CommentDao
-
- All Superinterfaces:
ObjectDao
- All Known Subinterfaces:
CommentDaoInternal
- All Known Implementing Classes:
HibernateCommentDao
public interface CommentDao extends ObjectDao
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description intcountAllCommentVersions()Count the total number of comments of all types, including previous versionsintcountComments(Searchable searchable)Count all comments in a searchable contentMap<Searchable,Integer>countComments(Collection<? extends Searchable> searchables)Count all comments for each content in a collectionMap<Long,Integer>countUnresolvedComments(@NonNull Collection<Long> containerIds)Count unresolved comments of comment containers.CommentgetById(long id)Get a comment by its idPageResponse<Comment>getChildren(Comment comment, LimitedRequest pageRequest, Depth depth, com.google.common.base.Predicate<? super Comment>... predicates)Deprecated.since 7.0.1.PageResponse<Comment>getContainerComments(long containerId, LimitedRequest pageRequest, Depth depth, com.google.common.base.Predicate<? super Comment>... predicates)Deprecated.since 7.0.1.List<Comment>getContainerComments(long containerId, Date since)Get the comments that have been added or updated since a specific timeList<Comment>getContainerComments(long containerId, Date since, String ignoreUsername)Get the comments that have been added or updated since a specific time but not by a userIteratorgetRecentlyUpdatedComments(long spaceId, int maxResults)Get all comments that have been updated recently in a space-
Methods inherited from interface bucket.core.persistence.ObjectDao
findAll, findAllSorted, findAllSorted, findByClassIds, getPersistentClass, refresh, remove, replicate, save, saveRaw
-
-
-
-
Method Detail
-
getById
Comment getById(long id)
Get a comment by its id- Parameters:
id- the comment's id- Returns:
- the comment object
-
getRecentlyUpdatedComments
Iterator getRecentlyUpdatedComments(long spaceId, int maxResults)
Get all comments that have been updated recently in a space- Parameters:
spaceId- the space's idmaxResults- the maximum number of comments that can be retrieved- Returns:
- a
Iteratorobject that encapsulates the list of comments found
-
getContainerComments
List<Comment> getContainerComments(long containerId, Date since)
Get the comments that have been added or updated since a specific time- Parameters:
containerId- the container's idsince-Datethe time after which the comments have been added or updated- Returns:
- a list of comments created or updated
-
getContainerComments
List<Comment> getContainerComments(long containerId, Date since, String ignoreUsername)
Get the comments that have been added or updated since a specific time but not by a user- Parameters:
containerId- the container's idsince-Datethe time after which the comments have been added or updatedignoreUsername- the user to be ignored- Returns:
- a list of comments created or updated
-
getContainerComments
@Deprecated PageResponse<Comment> getContainerComments(long containerId, LimitedRequest pageRequest, Depth depth, com.google.common.base.Predicate<? super Comment>... predicates)
Deprecated.since 7.0.1. UseCommentDaoInternal.getFilteredContainerComments(long, LimitedRequest, Depth, Predicate[])(long, Date)}Get the comments belonging to a container- Parameters:
containerId- the container's idpageRequest- the pagination infodepth- the search depthpredicates- the predicates used to filter the children- Returns:
- a
PageResponseobject that encapsulates the comments
-
countComments
Map<Searchable,Integer> countComments(Collection<? extends Searchable> searchables)
Count all comments for each content in a collection- Parameters:
searchables- a collection ofSearchableobjects representing the contents- Returns:
- a map of counts for each searchable content
-
countComments
int countComments(Searchable searchable)
Count all comments in a searchable content- Parameters:
searchable- aSearchableobject representing the content- Returns:
- a number of comments in the searchable content
-
countAllCommentVersions
int countAllCommentVersions()
Count the total number of comments of all types, including previous versions- Returns:
- the total number of comments
- Since:
- 6.11.0
-
getChildren
@Deprecated PageResponse<Comment> getChildren(Comment comment, LimitedRequest pageRequest, Depth depth, com.google.common.base.Predicate<? super Comment>... predicates)
Deprecated.Get the children of a comment- Parameters:
comment- the parent commentpageRequest- the pagination infodepth- the search depthpredicates- the predicates used to filter the children- Returns:
- the
PageResponseobject that encapsulates the children comments
-
countUnresolvedComments
Map<Long,Integer> countUnresolvedComments(@NonNull Collection<Long> containerIds)
Count unresolved comments of comment containers.- Parameters:
containerIds- the list of comment containers ids- Returns:
- The map of container id and its unresolved comment count
- Since:
- 5.7
-
-