public class CommentStorageImpl extends Object implements CommentStorage
| Constructor and Description |
|---|
CommentStorageImpl(DAOHandler daoHandler) |
| Modifier and Type | Method and Description |
|---|---|
CommentDto |
addComment(TaskDto task,
long parentCommentId,
String username,
String comment) |
CommentDto |
addComment(TaskDto task,
String username,
String commentText) |
CommentDto |
commentToDto(Comment comment) |
Comment |
commentToEntity(CommentDto commentDto) |
int |
countComments(long taskId) |
CommentDto |
getComment(long commentId) |
List<CommentDto> |
getComments(long taskId,
int offset,
int limit) |
List<CommentDto> |
getCommentsWithSubs(long taskId,
int offset,
int limit) |
List<CommentDto> |
listCommentsToDtos(List<Comment> comments) |
List<Comment> |
listCommentsToEntitys(List<CommentDto> commentDtos) |
List<CommentDto> |
loadSubComments(List<CommentDto> listComments)
Fetch sub comments of designed comments
|
void |
removeComment(long commentId) |
public CommentStorageImpl(DAOHandler daoHandler)
public CommentDto getComment(long commentId)
getComment in interface CommentStoragepublic List<CommentDto> getCommentsWithSubs(long taskId, int offset, int limit)
getCommentsWithSubs in interface CommentStoragepublic List<CommentDto> getComments(long taskId, int offset, int limit)
getComments in interface CommentStoragepublic int countComments(long taskId)
countComments in interface CommentStoragepublic CommentDto addComment(TaskDto task, String username, String commentText) throws EntityNotFoundException
addComment in interface CommentStorageEntityNotFoundExceptionpublic CommentDto addComment(TaskDto task, long parentCommentId, String username, String comment) throws EntityNotFoundException
addComment in interface CommentStorageEntityNotFoundExceptionpublic void removeComment(long commentId)
throws EntityNotFoundException
removeComment in interface CommentStorageEntityNotFoundExceptionpublic List<CommentDto> loadSubComments(List<CommentDto> listComments)
CommentStorageloadSubComments in interface CommentStoragelistComments - the given list of comments.public Comment commentToEntity(CommentDto commentDto)
commentToEntity in interface CommentStoragepublic CommentDto commentToDto(Comment comment)
commentToDto in interface CommentStoragepublic List<CommentDto> listCommentsToDtos(List<Comment> comments)
listCommentsToDtos in interface CommentStoragepublic List<Comment> listCommentsToEntitys(List<CommentDto> commentDtos)
listCommentsToEntitys in interface CommentStorageCopyright © 2003–2021 eXo Platform SAS. All rights reserved.