-
public interface ReactionRepositoryRepository to read and write reactions.
-
-
Method Summary
Modifier and Type Method Description abstract UnitinsertReaction(Reaction reaction)Inserts a reaction. abstract UnitupdateReactionsForMessageByDeletedDate(String userId, String messageId, Date deletedAt)Updates the Reaction.deletedAt for reactions of a message. abstract ReactionselectReactionById(Integer id)Selects reaction with specified id. abstract List<Reaction>selectReactionsByIds(List<Integer> ids)Selects all reactions with specified ids abstract List<Integer>selectReactionIdsBySyncStatus(SyncStatus syncStatus)Selects all reaction ids with specific SyncStatus. abstract List<Reaction>selectReactionsBySyncStatus(SyncStatus syncStatus)Selects all reactions with specific SyncStatus abstract ReactionselectUserReactionToMessage(String reactionType, String messageId, String userId)Selects the reaction of given type to the message if exists. abstract List<Reaction>selectUserReactionsToMessage(String messageId, String userId)Selects all current user reactions of a message. -
-
Method Detail
-
insertReaction
abstract Unit insertReaction(Reaction reaction)
Inserts a reaction.
- Parameters:
reaction- Reaction
-
updateReactionsForMessageByDeletedDate
abstract Unit updateReactionsForMessageByDeletedDate(String userId, String messageId, Date deletedAt)
Updates the Reaction.deletedAt for reactions of a message.
- Parameters:
userId- String.messageId- String.deletedAt- Date.
-
selectReactionById
abstract Reaction selectReactionById(Integer id)
Selects reaction with specified id.
- Parameters:
id- A reaction id to search for.
-
selectReactionsByIds
abstract List<Reaction> selectReactionsByIds(List<Integer> ids)
Selects all reactions with specified ids
- Parameters:
ids- A list of reaction id to search for.
-
selectReactionIdsBySyncStatus
abstract List<Integer> selectReactionIdsBySyncStatus(SyncStatus syncStatus)
Selects all reaction ids with specific SyncStatus.
- Parameters:
syncStatus- SyncStatus
-
selectReactionsBySyncStatus
abstract List<Reaction> selectReactionsBySyncStatus(SyncStatus syncStatus)
Selects all reactions with specific SyncStatus
- Parameters:
syncStatus- SyncStatus
-
selectUserReactionToMessage
abstract Reaction selectUserReactionToMessage(String reactionType, String messageId, String userId)
Selects the reaction of given type to the message if exists.
- Parameters:
reactionType- The type of reaction.messageId- The id of the message to which reaction belongs.userId- The id of the user who is the owner of reaction.
-
selectUserReactionsToMessage
abstract List<Reaction> selectUserReactionsToMessage(String messageId, String userId)
Selects all current user reactions of a message.
- Parameters:
messageId- String.userId- String.
-
-
-
-