Package com.jms.socialmedia.mybatis
Interface CommentsMapper
-
- All Known Implementing Classes:
SqlSessionCommentsMapper
public interface CommentsMapper
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
addComment(Comment comment)
int
deleteComment(int commentId)
int
editComment(int commentId, String commentText)
Comment
getComment(int commentId)
Collection<Integer>
getCommentLikes(int commentId)
Collection<Comment>
getComments(int postId)
Collection<Comment>
getCommentsByUserId(int userId)
int
getNumberOfCommentsInPost(int postId)
Integer
getUserIdFromCommentId(int commentId)
int
likeComment(int commentId, int userId)
int
unlikeComment(int commentId, int userId)
-
-
-
Method Detail
-
getNumberOfCommentsInPost
int getNumberOfCommentsInPost(int postId)
-
getComments
Collection<Comment> getComments(int postId)
-
getCommentsByUserId
Collection<Comment> getCommentsByUserId(int userId)
-
getComment
Comment getComment(int commentId)
-
getUserIdFromCommentId
Integer getUserIdFromCommentId(int commentId)
-
addComment
int addComment(Comment comment)
-
editComment
int editComment(@Param("id") int commentId, @Param("text") String commentText)
-
deleteComment
int deleteComment(int commentId)
-
getCommentLikes
Collection<Integer> getCommentLikes(int commentId)
-
likeComment
int likeComment(@Param("commentId") int commentId, @Param("userId") int userId)
-
unlikeComment
int unlikeComment(@Param("commentId") int commentId, @Param("userId") int userId)
-
-