public interface NeedRepository extends WonRepository<Need>
| Modifier and Type | Method and Description |
|---|---|
java.util.List<Need> |
findByNeedURI(java.net.URI URI) |
java.util.List<java.net.URI> |
findModifiedNeedURIsAfter(java.util.Date modifiedDate) |
org.springframework.data.domain.Slice<Need> |
findNeedsInactiveBetween(java.util.Date start,
java.util.Date end,
org.springframework.data.domain.Pageable pageable)
Finds needs that have been inactive between start and end date
|
org.springframework.data.domain.Slice<Need> |
findNeedsInactiveBetweenAndNotConnected(java.util.Date start,
java.util.Date end,
org.springframework.data.domain.Pageable pageable)
Finds needs that have been inactive between start and end date
|
org.springframework.data.domain.Slice<Need> |
findNeedsInactiveSince(java.util.Date since,
org.springframework.data.domain.Pageable pageable) |
org.springframework.data.domain.Slice<Need> |
findNeedsInactiveSinceAndNotConnected(java.util.Date since,
org.springframework.data.domain.Pageable pageable) |
Need |
findOneByNeedURI(java.net.URI needURI) |
Need |
findOneByNeedURIAndVersionNot(java.net.URI needURI,
int version) |
Need |
findOneByNeedURIForUpdate(java.net.URI uri) |
java.util.List<java.net.URI> |
getAllNeedURIs() |
org.springframework.data.domain.Slice<java.net.URI> |
getAllNeedURIs(NeedState needState,
org.springframework.data.domain.Pageable pageable) |
org.springframework.data.domain.Slice<java.net.URI> |
getAllNeedURIs(org.springframework.data.domain.Pageable pageable) |
java.util.List<java.lang.Object[]> |
getCountsPerConnectionState(java.net.URI needURI) |
org.springframework.data.domain.Slice<java.net.URI> |
getNeedURIsAfter(java.util.Date referenceDate,
NeedState needState,
org.springframework.data.domain.Pageable pageable) |
org.springframework.data.domain.Slice<java.net.URI> |
getNeedURIsAfter(java.util.Date referenceDate,
org.springframework.data.domain.Pageable pageable) |
org.springframework.data.domain.Slice<java.net.URI> |
getNeedURIsBefore(java.util.Date referenceDate,
NeedState needState,
org.springframework.data.domain.Pageable pageable) |
org.springframework.data.domain.Slice<java.net.URI> |
getNeedURIsBefore(java.util.Date referenceDate,
org.springframework.data.domain.Pageable pageable) |
findById, saveAndFlushjava.util.List<Need> findByNeedURI(java.net.URI URI)
@Query(value="select needURI from Need") java.util.List<java.net.URI> getAllNeedURIs()
@Query(value="select needURI from Need need") org.springframework.data.domain.Slice<java.net.URI> getAllNeedURIs(org.springframework.data.domain.Pageable pageable)
@Query(value="select needURI from Need need where need.state = :needState")
org.springframework.data.domain.Slice<java.net.URI> getAllNeedURIs(@Param(value="needState")
NeedState needState,
org.springframework.data.domain.Pageable pageable)
Need findOneByNeedURI(java.net.URI needURI)
Need findOneByNeedURIAndVersionNot(java.net.URI needURI, int version)
@Query(value="select needURI from Need need where need.creationDate < :referenceDate")
org.springframework.data.domain.Slice<java.net.URI> getNeedURIsBefore(@Param(value="referenceDate")
java.util.Date referenceDate,
org.springframework.data.domain.Pageable pageable)
@Query(value="select needURI from Need need where need.creationDate < :referenceDate and need.state = :needState")
org.springframework.data.domain.Slice<java.net.URI> getNeedURIsBefore(@Param(value="referenceDate")
java.util.Date referenceDate,
@Param(value="needState")
NeedState needState,
org.springframework.data.domain.Pageable pageable)
@Query(value="select needURI from Need need where need.creationDate > :referenceDate")
org.springframework.data.domain.Slice<java.net.URI> getNeedURIsAfter(@Param(value="referenceDate")
java.util.Date referenceDate,
org.springframework.data.domain.Pageable pageable)
@Query(value="select needURI from Need need where need.creationDate > :referenceDate and need.state = :needState")
org.springframework.data.domain.Slice<java.net.URI> getNeedURIsAfter(@Param(value="referenceDate")
java.util.Date referenceDate,
@Param(value="needState")
NeedState needState,
org.springframework.data.domain.Pageable pageable)
@Query(value="select needURI from Need need where need.lastUpdate > :modifiedDate")
java.util.List<java.net.URI> findModifiedNeedURIsAfter(@Param(value="modifiedDate")
java.util.Date modifiedDate)
@Query(value="select state, count(*) from Connection where needURI = :need group by state")
java.util.List<java.lang.Object[]> getCountsPerConnectionState(@Param(value="need")
java.net.URI needURI)
@Lock(value=PESSIMISTIC_WRITE) @Query(value="select need from Need need where needURI= :uri") Need findOneByNeedURIForUpdate(@Param(value="uri") java.net.URI uri)
@Query(value="select distinct need from Need need join Connection c on ( c.needURI = need.needURI ) join MessageEventPlaceholder mep on (mep.parentURI = need.needURI or mep.parentURI = c.connectionURI) where need.state = \'ACTIVE\' and mep.messageType <> \'NEED_MESSAGE\' and (select count(*) from Connection con where con.needURI = need.needURI and con.state = \'CONNECTED\') = 0and ( mep.senderURI = c.connectionURI or mep.senderNeedURI = need.needURI)group by need having max(mep.creationDate) > :startDate and max(mep.creationDate) < :endDate ") org.springframework.data.domain.Slice<Need> findNeedsInactiveBetweenAndNotConnected(@Param(value="startDate") java.util.Date start, @Param(value="endDate") java.util.Date end, org.springframework.data.domain.Pageable pageable)
start - end - pageable - @Query(value="select distinct need from Need need join Connection c on ( c.needURI = need.needURI ) join MessageEventPlaceholder mep on (mep.parentURI = need.needURI or mep.parentURI = c.connectionURI) where need.state = \'ACTIVE\' and mep.messageType <> \'NEED_MESSAGE\' and ( mep.senderURI = c.connectionURI or mep.senderNeedURI = need.needURI)group by need having max(mep.creationDate) > :startDate and max(mep.creationDate) < :endDate ") org.springframework.data.domain.Slice<Need> findNeedsInactiveBetween(@Param(value="startDate") java.util.Date start, @Param(value="endDate") java.util.Date end, org.springframework.data.domain.Pageable pageable)
start - end - pageable - @Query(value="select distinct need from Need need join Connection c on ( c.needURI = need.needURI ) join MessageEventPlaceholder mep on (mep.parentURI = need.needURI or mep.parentURI = c.connectionURI) where need.state = \'ACTIVE\' and mep.messageType <> \'NEED_MESSAGE\' and (select count(*) from Connection con where con.needURI = need.needURI and con.state = \'CONNECTED\') = 0and ( mep.senderURI = c.connectionURI or mep.senderNeedURI = need.needURI)group by need having max(mep.creationDate) < :sinceDate") org.springframework.data.domain.Slice<Need> findNeedsInactiveSinceAndNotConnected(@Param(value="sinceDate") java.util.Date since, org.springframework.data.domain.Pageable pageable)
@Query(value="select distinct need from Need need join Connection c on ( c.needURI = need.needURI ) join MessageEventPlaceholder mep on (mep.parentURI = need.needURI or mep.parentURI = c.connectionURI) where need.state = \'ACTIVE\' and mep.messageType <> \'NEED_MESSAGE\' and ( mep.senderURI = c.connectionURI or mep.senderNeedURI = need.needURI)group by need having max(mep.creationDate) < :sinceDate") org.springframework.data.domain.Slice<Need> findNeedsInactiveSince(@Param(value="sinceDate") java.util.Date since, org.springframework.data.domain.Pageable pageable)
Copyright © 2018. All Rights Reserved.