Interface IResourceLinkDao

All Superinterfaces:
org.springframework.data.repository.CrudRepository<ResourceLink,Long>, IHapiFhirJpaRepository, org.springframework.data.jpa.repository.JpaRepository<ResourceLink,Long>, org.springframework.data.repository.ListCrudRepository<ResourceLink,Long>, org.springframework.data.repository.ListPagingAndSortingRepository<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 Type
    Method
    Description
    void
    deleteByResourceId(Long theResourcePid)
     
     
    Loads a collection of ResourceLink entities by PID, but also eagerly fetches the target resources and their forced IDs
     

    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, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush

    Methods inherited from interface org.springframework.data.repository.ListCrudRepository

    findAll, findAllById, saveAll

    Methods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository

    findAll

    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

    • 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 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