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 offsetConversationhaveConversation(Long id)Checks if conversation with given id existsvoidsave(Message message)Saves message
-
-
-
Method Detail
-
save
public void save(Message message)
Description copied from interface:MessageServiceSaves message- Specified by:
savein interfaceMessageService- Parameters:
message- Message data
-
haveConversation
public Conversation haveConversation(Long id)
Description copied from interface:MessageServiceChecks if conversation with given id exists- Specified by:
haveConversationin 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:MessageServiceSearch for messages with offset- Specified by:
findByIdGreaterThanin interfaceMessageService- Parameters:
conversationId- Conversation idid- Offset message id- Returns:
- List of messages of given conversation with identifiers greater than given
-
-