Interface CommentStorage
- All Known Implementing Classes:
CommentStorageImpl
public interface CommentStorage
-
Method Summary
Modifier and TypeMethodDescriptionaddComment(TaskDto task, long parentCommentId, String username, String comment) addComment(TaskDto task, String username, String commentText) intcountComments(long taskId) intcountCommentsWithSubs(long taskId) Retrieves the Task comments including sub-commentsgetComment(long commentId) getComments(long taskId, int offset, int limit) getCommentsSummaries(Collection<Long> taskIds) Summarizes the comments of several tasks in two queries, whatever their number.getCommentsWithSubs(long taskId, int offset, int limit) getLastComment(long taskId) loadSubComments(List<CommentDto> listComments) Fetch sub comments of designed commentsvoidremoveComment(long commentId)
-
Method Details
-
getComment
-
getCommentsWithSubs
-
getComments
-
countComments
int countComments(long taskId) -
addComment
CommentDto addComment(TaskDto task, String username, String commentText) throws EntityNotFoundException - Throws:
EntityNotFoundException
-
addComment
CommentDto addComment(TaskDto task, long parentCommentId, String username, String comment) throws EntityNotFoundException - Throws:
EntityNotFoundException
-
removeComment
- Throws:
EntityNotFoundException
-
loadSubComments
Fetch sub comments of designed comments- Parameters:
listComments- the given list of comments.- Returns:
- List of SubComments
-
countCommentsWithSubs
int countCommentsWithSubs(long taskId) Retrieves the Task comments including sub-comments- Parameters:
taskId- Task identifier- Returns:
Integer
-
getLastComment
- Parameters:
taskId- Task identifier- Returns:
- null if no comments else last created comment on task
-
getCommentsSummaries
Summarizes the comments of several tasks in two queries, whatever their number.- Parameters:
taskIds- the tasks- Returns:
- for each of them that has comments, the number of its comments, replies included, and its latest comment's date and author; the tasks without comments are absent
-