Package ru.kpekepsalt.ruvik.service.Impl
Class MessageServiceImpl
- java.lang.Object
-
- ru.kpekepsalt.ruvik.service.Impl.MessageServiceImpl
-
- All Implemented Interfaces:
MessageService
@Service public class MessageServiceImpl extends Object implements MessageService
Service for messaging operations
-
-
Constructor Summary
Constructors Constructor Description MessageServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Message>
findByIdGreaterThan(Long conversationId, Long id)
Search for messages with offsetConversation
haveConversation(Long id)
Checks if conversation with given id existsvoid
save(Message message)
Saves message
-
-
-
Method Detail
-
save
public void save(Message message)
Description copied from interface:MessageService
Saves message- Specified by:
save
in interfaceMessageService
- Parameters:
message
- Message data
-
haveConversation
public Conversation haveConversation(Long id)
Description copied from interface:MessageService
Checks if conversation with given id exists- Specified by:
haveConversation
in interfaceMessageService
- Parameters:
id
- Conversation id- Returns:
- Conversation or null if not exists
-
findByIdGreaterThan
public List<Message> findByIdGreaterThan(Long conversationId, Long id)
Description copied from interface:MessageService
Search for messages with offset- Specified by:
findByIdGreaterThan
in interfaceMessageService
- Parameters:
conversationId
- Conversation idid
- Offset message id- Returns:
- List of messages of given conversation with identifiers greater than given
-
-