Interface CommentReactionManager
- All Known Implementing Classes:
DefaultCommentReactionManager
public interface CommentReactionManager
- Since:
- 8.17
-
Method Summary
Modifier and TypeMethodDescriptionCreates a database record for the reaction made by the user with given key to the given comment and given emoji.void
Deletes the user reaction with given emoji to given comment.void
deleteAllByCommentId
(long commentId) Deletes all reactions associated with the comment with given ID.boolean
Determines if the user with given key already reacted with given emoji to given comment.findByCommentAndEmoticon
(long commentId, String emoticon) Returns all reactions for given emoji and given comment.findByCommentId
(long commentId) Returns all the reactions for given comment.findById
(long id) Returns the reaction with given ID.long
getReactionCount
(long commentId, String emoticon) Returns a number of users who reacted with given emoji to given comment.
-
Method Details
-
create
Creates a database record for the reaction made by the user with given key to the given comment and given emoji.- Parameters:
commentId
- the ID of the commentemoticon
- Unicode of the emojiuserKey
- the key of the user who reactedcreated
- the timestamp of reaction- Returns:
- the
CommentReactionDTO
object
-
findById
Returns the reaction with given ID.- Parameters:
id
- the ID of the reaction- Returns:
- the
CommentReactionDTO
object
-
delete
Deletes the user reaction with given emoji to given comment.- Parameters:
commentId
- the ID of the commentemoticon
- Unicode of the emojiuserKey
- the key of the user performing the operation
-
findByCommentId
Returns all the reactions for given comment.- Parameters:
commentId
- the ID of the comment- Returns:
- a collection of
CommentReactionDTO
-
getReactionCount
Returns a number of users who reacted with given emoji to given comment.- Parameters:
commentId
- the ID of the commentemoticon
- Unicode of the emoji- Returns:
- a number of users who reacted
-
findByCommentAndEmoticon
Returns all reactions for given emoji and given comment.- Parameters:
commentId
- the ID of the commentemoticon
- Unicode of the emoji- Returns:
- a collections of
CommentReactionDTO
-
exists
Determines if the user with given key already reacted with given emoji to given comment.- Parameters:
commentId
- the ID of the commentemoticon
- Unicode of the emojiuserKey
- the key of the user performing the operation- Returns:
- true if the user reacted, or false otherwise
-
deleteAllByCommentId
void deleteAllByCommentId(long commentId) Deletes all reactions associated with the comment with given ID.- Parameters:
commentId
- the ID of the comment
-