@Service public class CommentsService extends java.lang.Object implements ICommentsService
| Constructor and Description |
|---|
CommentsService() |
| Modifier and Type | Method and Description |
|---|---|
CommentBO |
add(CommentVO commentVO,
java.lang.Long commentableId)
This method adds a new comment to a specified by id commentable.
|
void |
delete(java.lang.Long commentableId,
java.lang.Long commentId)
This method deletes a specified by id comment to a specified by id commentable.
|
java.util.List<CommentBO> |
findByCommentableId(java.lang.Long commentableId)
This method returns all comments that are available
to a specified by id commentable.
|
CommentBO |
update(CommentVO commentVO,
java.lang.Long commentableId,
java.lang.Long commentId)
This method updates an existing specified by id comment to a specified by id commentable.
|
public CommentBO add(CommentVO commentVO, java.lang.Long commentableId)
add in interface ICommentsServicecommentVO - CommentVO's instance with user's input datacommentableId - Id of commentable to add a comment topublic java.util.List<CommentBO> findByCommentableId(java.lang.Long commentableId)
findByCommentableId in interface ICommentsServicecommentableId - Id of commentable to receive comments topublic void delete(java.lang.Long commentableId,
java.lang.Long commentId)
delete in interface ICommentsServicecommentableId - Id of commentable to delete an comment tocommentId - Id of comment to deletepublic CommentBO update(CommentVO commentVO, java.lang.Long commentableId, java.lang.Long commentId)
update in interface ICommentsServicecommentVO - CommentVO's instance with user's changed and old data.commentableId - Id of commentable to edit an comment tocommentId - Id of comment to edit