Interface ChatMessageRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<ChatMessage,
,Long> org.springframework.data.repository.Repository<ChatMessage,
Long>
@Repository
public interface ChatMessageRepository
extends org.springframework.data.repository.CrudRepository<ChatMessage,Long>
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.data.domain.Page<ChatMessage>
findAll
(org.springframework.data.domain.Pageable pageable) org.springframework.data.domain.Page<ChatMessageWithUserInfo>
findAllWithUserInfo
(org.springframework.data.domain.Pageable pageable) Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAll, findAllById, findById, save, saveAll
-
Method Details
-
findAll
org.springframework.data.domain.Page<ChatMessage> findAll(org.springframework.data.domain.Pageable pageable) -
findAllWithUserInfo
@Query("SELECT new edu.ucsb.cs156.gauchoride.models.ChatMessageWithUserInfo(m, u.email) FROM chat_messages m, users u WHERE m.userId = u.id") org.springframework.data.domain.Page<ChatMessageWithUserInfo> findAllWithUserInfo(org.springframework.data.domain.Pageable pageable)
-