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)
CommentReactionManager
create
in interface CommentReactionManager
commentId
- 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)
CommentReactionManager
findById
in interface CommentReactionManager
id
- the ID of the reactionCommentReactionDTO
objectpublic void delete(long commentId, String emoticon, String userKey)
CommentReactionManager
delete
in interface CommentReactionManager
commentId
- the ID of the commentemoticon
- Unicode of the emojiuserKey
- the key of the user performing the operationpublic Collection<CommentReactionDTO> findByCommentId(long commentId)
CommentReactionManager
findByCommentId
in interface CommentReactionManager
commentId
- the ID of the commentCommentReactionDTO
public long getReactionCount(long commentId, String emoticon)
CommentReactionManager
getReactionCount
in interface CommentReactionManager
commentId
- the ID of the commentemoticon
- Unicode of the emojipublic Collection<CommentReactionDTO> findByCommentAndEmoticon(long commentId, String emoticon)
CommentReactionManager
findByCommentAndEmoticon
in interface CommentReactionManager
commentId
- the ID of the commentemoticon
- Unicode of the emojiCommentReactionDTO
public boolean exists(long commentId, String emoticon, String userKey)
CommentReactionManager
exists
in interface CommentReactionManager
commentId
- the ID of the commentemoticon
- Unicode of the emojiuserKey
- the key of the user performing the operationpublic void deleteAllByCommentId(long commentId)
CommentReactionManager
deleteAllByCommentId
in interface CommentReactionManager
commentId
- the ID of the commentCopyright © 2002-2022 Atlassian. All Rights Reserved.