@Repository public interface CitizenInboxRepository extends org.springframework.data.jpa.repository.JpaRepository<CitizenInbox,Long>
| Modifier and Type | Method and Description |
|---|---|
List<CitizenInbox> |
findAllInboxMessage(Long citizenUserId) |
List<CitizenInbox> |
findAllInboxMessageByType(MessageType messageType,
Long citizenUserId) |
List<CitizenInbox> |
findMyAccountMessages(MessageType messageType,
Long citizenUserId) |
Integer |
findUnreadMessagesCount(Long citizenUserId) |
deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAll, flush, getOne, save, saveAndFlushfindAll@Query(value="select count(*) from CitizenInbox ci where ci.assignedToCitizen.id=:citizenUserId and ci.read is false") Integer findUnreadMessagesCount(@Param(value="citizenUserId") Long citizenUserId)
@Query(value="select ci from CitizenInbox ci where ci.assignedToCitizen.id=:citizenUserId order by ci.createdDate desc") List<CitizenInbox> findAllInboxMessage(@Param(value="citizenUserId") Long citizenUserId)
@Query(value="select ci from CitizenInbox ci where ci.messageType=:messageType and ci.assignedToCitizen.id=:citizenUserId order by ci.createdDate desc") List<CitizenInbox> findAllInboxMessageByType(@Param(value="messageType") MessageType messageType, @Param(value="citizenUserId") Long citizenUserId)
@Query(value="select ci from CitizenInbox ci where ci.messageType=:messageType and ci.createdBy.id=:citizenUserId and ci.id in (select max(ci1.id) from CitizenInbox ci1 where ci1.messageType=:messageType and ci1.createdBy.id=:citizenUserId group by ci1.identifier) order by ci.createdDate desc") List<CitizenInbox> findMyAccountMessages(@Param(value="messageType") MessageType messageType, @Param(value="citizenUserId") Long citizenUserId)
Copyright © 2015–2017 eGovernments Foundation. All rights reserved.