Package ca.uhn.fhir.jpa.dao.data
Interface IBatch2JobInstanceRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<Batch2JobInstanceEntity,,String> IHapiFhirJpaRepository,org.springframework.data.jpa.repository.JpaRepository<Batch2JobInstanceEntity,,String> org.springframework.data.repository.PagingAndSortingRepository<Batch2JobInstanceEntity,,String> org.springframework.data.repository.query.QueryByExampleExecutor<Batch2JobInstanceEntity>,org.springframework.data.repository.Repository<Batch2JobInstanceEntity,String>
public interface IBatch2JobInstanceRepository
extends org.springframework.data.jpa.repository.JpaRepository<Batch2JobInstanceEntity,String>, IHapiFhirJpaRepository
-
Method Summary
Modifier and TypeMethodDescriptionfetchInstancesByJobDefinitionIdAndStatus(String theJobDefinitionId, Set<StatusEnum> theIncompleteStatuses, org.springframework.data.domain.Pageable thePageRequest) findInstancesByJobDefinitionId(String theJobDefinitionId, org.springframework.data.domain.Pageable thePageRequest) findInstancesByJobIdAndParams(String theDefinitionId, String theParams, org.springframework.data.domain.Pageable thePageable) findInstancesByJobIdAndStatusAndExpiry(String theDefinitionId, Set<StatusEnum> theStatus, Date theCutoff, org.springframework.data.domain.Pageable thePageable) findInstancesByJobIdParamsAndStatus(String theDefinitionId, String theParams, Set<StatusEnum> theStatus, org.springframework.data.domain.Pageable thePageable) findInstancesByJobStatus(StatusEnum theState, org.springframework.data.domain.Pageable thePageable) findTotalJobsOfStatus(StatusEnum theState) intupdateInstanceCancelled(String theInstanceId, boolean theCancelled) intupdateInstanceStatusIfIn(String theInstanceId, StatusEnum theNewState, Set<StatusEnum> thePriorStates) intupdateInstanceUpdateTime(String theInstanceId, Date theUpdated) intupdateWorkChunksPurgedTrue(String theInstanceId) Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, saveMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getById, getOne, getReferenceById, saveAll, saveAllAndFlush, saveAndFlushMethods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Method Details
-
updateInstanceStatusIfIn
@Modifying @Query("UPDATE Batch2JobInstanceEntity e SET e.myStatus = :status WHERE e.myId = :id and e.myStatus IN ( :prior_states )") int updateInstanceStatusIfIn(@Param("id") String theInstanceId, @Param("status") StatusEnum theNewState, @Param("prior_states") Set<StatusEnum> thePriorStates) -
updateInstanceUpdateTime
@Modifying @Query("UPDATE Batch2JobInstanceEntity e SET e.myUpdateTime = :updated WHERE e.myId = :id") int updateInstanceUpdateTime(@Param("id") String theInstanceId, @Param("updated") Date theUpdated) -
updateInstanceCancelled
@Modifying @Query("UPDATE Batch2JobInstanceEntity e SET e.myCancelled = :cancelled WHERE e.myId = :id") int updateInstanceCancelled(@Param("id") String theInstanceId, @Param("cancelled") boolean theCancelled) -
updateWorkChunksPurgedTrue
@Modifying @Query("UPDATE Batch2JobInstanceEntity e SET e.myWorkChunksPurged = true WHERE e.myId = :id") int updateWorkChunksPurgedTrue(@Param("id") String theInstanceId) -
findInstancesByJobIdParamsAndStatus
@Query("SELECT b from Batch2JobInstanceEntity b WHERE b.myDefinitionId = :defId AND b.myParamsJson = :params AND b.myStatus IN( :stats )") List<Batch2JobInstanceEntity> findInstancesByJobIdParamsAndStatus(@Param("defId") String theDefinitionId, @Param("params") String theParams, @Param("stats") Set<StatusEnum> theStatus, org.springframework.data.domain.Pageable thePageable) -
findInstancesByJobIdAndParams
@Query("SELECT b from Batch2JobInstanceEntity b WHERE b.myDefinitionId = :defId AND b.myParamsJson = :params") List<Batch2JobInstanceEntity> findInstancesByJobIdAndParams(@Param("defId") String theDefinitionId, @Param("params") String theParams, org.springframework.data.domain.Pageable thePageable) -
findInstancesByJobStatus
@Query("SELECT b from Batch2JobInstanceEntity b WHERE b.myStatus = :status") List<Batch2JobInstanceEntity> findInstancesByJobStatus(@Param("status") StatusEnum theState, org.springframework.data.domain.Pageable thePageable) -
findTotalJobsOfStatus
@Query("SELECT count(b) from Batch2JobInstanceEntity b WHERE b.myStatus = :status") Integer findTotalJobsOfStatus(@Param("status") StatusEnum theState) -
findInstancesByJobIdAndStatusAndExpiry
@Query("SELECT b from Batch2JobInstanceEntity b WHERE b.myDefinitionId = :defId AND b.myStatus IN( :stats ) AND b.myEndTime < :cutoff") List<Batch2JobInstanceEntity> findInstancesByJobIdAndStatusAndExpiry(@Param("defId") String theDefinitionId, @Param("stats") Set<StatusEnum> theStatus, @Param("cutoff") Date theCutoff, org.springframework.data.domain.Pageable thePageable) -
fetchInstancesByJobDefinitionIdAndStatus
@Query("SELECT e FROM Batch2JobInstanceEntity e WHERE e.myDefinitionId = :jobDefinitionId AND e.myStatus IN :statuses") List<Batch2JobInstanceEntity> fetchInstancesByJobDefinitionIdAndStatus(@Param("jobDefinitionId") String theJobDefinitionId, @Param("statuses") Set<StatusEnum> theIncompleteStatuses, org.springframework.data.domain.Pageable thePageRequest) -
findInstancesByJobDefinitionId
@Query("SELECT e FROM Batch2JobInstanceEntity e WHERE e.myDefinitionId = :jobDefinitionId") List<Batch2JobInstanceEntity> findInstancesByJobDefinitionId(@Param("jobDefinitionId") String theJobDefinitionId, org.springframework.data.domain.Pageable thePageRequest)
-