public class DefaultCommentReactionManager extends Object implements CommentReactionManager
| Constructor and Description |
|---|
DefaultCommentReactionManager(QueryDslAccessor dslAccessor,
OfBizDelegator ofBizDelegator) |
| Modifier and Type | Method and Description |
|---|---|
CommentReactionDTO |
create(long commentId,
String emoticon,
String userKey,
java.time.Instant created)
Creates a database record for the reaction made by the user with given key to the given comment and given emoji.
|
void |
delete(long commentId,
String emoticon,
String userKey)
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 |
exists(long commentId,
String emoticon,
String userKey)
Determines if the user with given key already reacted with given emoji to given comment.
|
Collection<CommentReactionDTO> |
findByCommentAndEmoticon(long commentId,
String emoticon)
Returns all reactions for given emoji and given comment.
|
Collection<CommentReactionDTO> |
findByCommentId(long commentId)
Returns all the reactions for given comment.
|
CommentReactionDTO |
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.
|
public DefaultCommentReactionManager(QueryDslAccessor dslAccessor, OfBizDelegator ofBizDelegator)
public CommentReactionDTO create(long commentId, String emoticon, String userKey, java.time.Instant created)
CommentReactionManagercreate in interface CommentReactionManagercommentId - the ID of the commentemoticon - Unicode of the emojiuserKey - the key of the user who reactedcreated - the timestamp of reactionCommentReactionDTO objectpublic CommentReactionDTO findById(long id)
CommentReactionManagerfindById in interface CommentReactionManagerid - the ID of the reactionCommentReactionDTO objectpublic void delete(long commentId,
String emoticon,
String userKey)
CommentReactionManagerdelete in interface CommentReactionManagercommentId - the ID of the commentemoticon - Unicode of the emojiuserKey - the key of the user performing the operationpublic Collection<CommentReactionDTO> findByCommentId(long commentId)
CommentReactionManagerfindByCommentId in interface CommentReactionManagercommentId - the ID of the commentCommentReactionDTOpublic long getReactionCount(long commentId,
String emoticon)
CommentReactionManagergetReactionCount in interface CommentReactionManagercommentId - the ID of the commentemoticon - Unicode of the emojipublic Collection<CommentReactionDTO> findByCommentAndEmoticon(long commentId, String emoticon)
CommentReactionManagerfindByCommentAndEmoticon in interface CommentReactionManagercommentId - the ID of the commentemoticon - Unicode of the emojiCommentReactionDTOpublic boolean exists(long commentId,
String emoticon,
String userKey)
CommentReactionManagerexists in interface CommentReactionManagercommentId - the ID of the commentemoticon - Unicode of the emojiuserKey - the key of the user performing the operationpublic void deleteAllByCommentId(long commentId)
CommentReactionManagerdeleteAllByCommentId in interface CommentReactionManagercommentId - the ID of the commentCopyright © 2002-2022 Atlassian. All Rights Reserved.