Interface MessageRepository

  • All Superinterfaces:
    org.springframework.data.repository.CrudRepository<Message,​java.lang.String>, org.springframework.data.mongodb.repository.MongoRepository<Message,​java.lang.String>, org.springframework.data.repository.PagingAndSortingRepository<Message,​java.lang.String>, org.springframework.data.repository.query.QueryByExampleExecutor<Message>, org.springframework.data.repository.Repository<Message,​java.lang.String>

    @Repository
    public interface MessageRepository
    extends org.springframework.data.mongodb.repository.MongoRepository<Message,​java.lang.String>
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.List<Message> findByChatId​(java.lang.String chatId)  
      java.util.List<Message> findUnreadByChatId​(java.lang.String chatId)  
      • Methods inherited from interface org.springframework.data.repository.CrudRepository

        count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAllById, findById, save
      • Methods inherited from interface org.springframework.data.mongodb.repository.MongoRepository

        findAll, findAll, findAll, findAll, insert, insert, saveAll
      • Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

        findAll
      • Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

        count, exists, findAll, findBy, findOne
    • Method Detail

      • findByChatId

        @Query("{ \'embeddedChat._id\' : ?0 }")
        java.util.List<Message> findByChatId​(java.lang.String chatId)
      • findUnreadByChatId

        @Query("{ \'embeddedChat._id\' : ?0 , messageState : \'UNREAD\' }")
        java.util.List<Message> findUnreadByChatId​(java.lang.String chatId)