Package ca.uhn.fhir.jpa.dao.data
Interface IResourceLinkDao
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<ResourceLink,,Long> IHapiFhirJpaRepository,org.springframework.data.jpa.repository.JpaRepository<ResourceLink,,Long> org.springframework.data.repository.PagingAndSortingRepository<ResourceLink,,Long> org.springframework.data.repository.query.QueryByExampleExecutor<ResourceLink>,org.springframework.data.repository.Repository<ResourceLink,Long>
public interface IResourceLinkDao
extends org.springframework.data.jpa.repository.JpaRepository<ResourceLink,Long>, IHapiFhirJpaRepository
-
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteByResourceId(Long theResourcePid) findAllForSourceResourceId(Long thePatientId) findByPidAndFetchTargetDetails(List<Long> thePids) Loads a collection of ResourceLink entities by PID, but also eagerly fetches the target resources and their forced IDsfindWithTargetPidIn(List<Long> thePids) 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
-
deleteByResourceId
@Modifying @Query("DELETE FROM ResourceLink t WHERE t.mySourceResourcePid = :resId") void deleteByResourceId(@Param("resId") Long theResourcePid) -
findAllForSourceResourceId
@Query("SELECT t FROM ResourceLink t WHERE t.mySourceResourcePid = :resId") List<ResourceLink> findAllForSourceResourceId(@Param("resId") Long thePatientId) -
findWithTargetPidIn
@Query("SELECT t FROM ResourceLink t WHERE t.myTargetResourcePid in :resIds") List<ResourceLink> findWithTargetPidIn(@Param("resIds") List<Long> thePids) -
findByPidAndFetchTargetDetails
@Query("SELECT t FROM ResourceLink t LEFT JOIN FETCH t.myTargetResource tr LEFT JOIN FETCH tr.myForcedId WHERE t.myId in :pids") List<ResourceLink> findByPidAndFetchTargetDetails(@Param("pids") List<Long> thePids) Loads a collection of ResourceLink entities by PID, but also eagerly fetches the target resources and their forced IDs
-