Package ca.uhn.fhir.jpa.dao.data
Interface ISearchDao
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<Search,
,Long> IHapiFhirJpaRepository
,org.springframework.data.jpa.repository.JpaRepository<Search,
,Long> org.springframework.data.repository.PagingAndSortingRepository<Search,
,Long> org.springframework.data.repository.query.QueryByExampleExecutor<Search>
,org.springframework.data.repository.Repository<Search,
Long>
public interface ISearchDao
extends org.springframework.data.jpa.repository.JpaRepository<Search,Long>, IHapiFhirJpaRepository
-
Method Summary
Modifier and TypeMethodDescriptionint
void
deleteByPid
(Long theId) findByUuidAndFetchIncludes
(String theUuid) org.springframework.data.domain.Slice<Long>
findDeleted
(org.springframework.data.domain.Pageable thePage) org.springframework.data.domain.Slice<Long>
findWhereCreatedBefore
(Date theCutoff, Date theNow, org.springframework.data.domain.Pageable thePage) findWithCutoffOrExpiry
(String theResourceType, int theHashCode, Date theCreatedCutoff) void
updateDeleted
(Long thePid, boolean theDeleted) Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save
Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getById, getOne, saveAll, saveAllAndFlush, saveAndFlush
Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAll
Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Method Details
-
findByUuidAndFetchIncludes
@Query("SELECT s FROM Search s LEFT OUTER JOIN FETCH s.myIncludes WHERE s.myUuid = :uuid") Optional<Search> findByUuidAndFetchIncludes(@Param("uuid") String theUuid) -
findWhereCreatedBefore
@Query("SELECT s.myId FROM Search s WHERE (s.myCreated < :cutoff) AND (s.myExpiryOrNull IS NULL OR s.myExpiryOrNull < :now) AND (s.myDeleted IS NULL OR s.myDeleted = FALSE)") org.springframework.data.domain.Slice<Long> findWhereCreatedBefore(@Param("cutoff") Date theCutoff, @Param("now") Date theNow, org.springframework.data.domain.Pageable thePage) -
findDeleted
@Query("SELECT s.myId FROM Search s WHERE s.myDeleted = TRUE") org.springframework.data.domain.Slice<Long> findDeleted(org.springframework.data.domain.Pageable thePage) -
findWithCutoffOrExpiry
@Query("SELECT s FROM Search s WHERE s.myResourceType = :type AND mySearchQueryStringHash = :hash AND (s.myCreated > :cutoff) AND s.myDeleted = FALSE AND s.myStatus <> \'FAILED\'") Collection<Search> findWithCutoffOrExpiry(@Param("type") String theResourceType, @Param("hash") int theHashCode, @Param("cutoff") Date theCreatedCutoff) -
countDeleted
-
updateDeleted
@Modifying @Query("UPDATE Search s SET s.myDeleted = :deleted WHERE s.myId = :pid") void updateDeleted(@Param("pid") Long thePid, @Param("deleted") boolean theDeleted) -
deleteByPid
@Modifying @Query("DELETE FROM Search s WHERE s.myId = :pid") void deleteByPid(@Param("pid") Long theId)
-