public interface ISubscriptionTableDao extends org.springframework.data.jpa.repository.JpaRepository<SubscriptionTable,Long>
| Modifier and Type | Method and Description |
|---|---|
void |
deleteAllForSubscription(Long theSubscriptionId) |
Collection<SubscriptionTable> |
findInactiveBeforeCutoff(Date theCutoff) |
SubscriptionTable |
findOneByResourcePid(Long theId) |
Collection<Long> |
findSubscriptionsWhichNeedToBeChecked(String theStatus,
Date theNextCheck) |
int |
updateLastClientPoll(Date theLastClientPoll) |
deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAll, flush, getOne, save, saveAndFlushfindAll@Query(value="SELECT t FROM SubscriptionTable t WHERE t.myResId = :pid") SubscriptionTable findOneByResourcePid(@Param(value="pid") Long theId)
@Modifying
@Query(value="DELETE FROM SubscriptionTable t WHERE t.myId = :id ")
void deleteAllForSubscription(@Param(value="id")
Long theSubscriptionId)
@Modifying
@Query(value="UPDATE SubscriptionTable t SET t.myLastClientPoll = :last_client_poll")
int updateLastClientPoll(@Param(value="last_client_poll")
Date theLastClientPoll)
@Query(value="SELECT t FROM SubscriptionTable t WHERE t.myLastClientPoll < :cutoff OR (t.myLastClientPoll IS NULL AND t.myCreated < :cutoff)") Collection<SubscriptionTable> findInactiveBeforeCutoff(@Param(value="cutoff") Date theCutoff)
@Query(value="SELECT t.myId FROM SubscriptionTable t WHERE t.myStatus = :status AND t.myNextCheck <= :next_check") Collection<Long> findSubscriptionsWhichNeedToBeChecked(@Param(value="status") String theStatus, @Param(value="next_check") Date theNextCheck)
Copyright © 2014–2017 University Health Network. All rights reserved.