Package ca.uhn.fhir.jpa.dao.data
Interface ITermCodeSystemVersionDao
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<TermCodeSystemVersion,
,IdAndPartitionId> IHapiFhirJpaRepository
,org.springframework.data.jpa.repository.JpaRepository<TermCodeSystemVersion,
,IdAndPartitionId> org.springframework.data.repository.ListCrudRepository<TermCodeSystemVersion,
,IdAndPartitionId> org.springframework.data.repository.ListPagingAndSortingRepository<TermCodeSystemVersion,
,IdAndPartitionId> org.springframework.data.repository.PagingAndSortingRepository<TermCodeSystemVersion,
,IdAndPartitionId> org.springframework.data.repository.query.QueryByExampleExecutor<TermCodeSystemVersion>
,org.springframework.data.repository.Repository<TermCodeSystemVersion,
IdAndPartitionId>
public interface ITermCodeSystemVersionDao
extends org.springframework.data.jpa.repository.JpaRepository<TermCodeSystemVersion,IdAndPartitionId>, IHapiFhirJpaRepository
-
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteForCodeSystem
(TermCodeSystem theCodeSystem) findByCodeSystemPidAndVersion
(Long theCodeSystemPid, String theCodeSystemVersionId) findByCodeSystemPidVersionIsNull
(Long theCodeSystemPid) findByCodeSystemResourcePid
(JpaPid theCodeSystemResourcePid) findByCodeSystemUriAndVersion
(String theCodeSystemUri, String theCodeSystemVersionId) findByPid
(long theVersionPid) Deprecated.findCurrentVersionForCodeSystemResourcePid
(Long theCodeSystemResourcePid) findSortedPidsByCodeSystemPid
(Long theCodeSystemPid) 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
-
deleteForCodeSystem
@Modifying @Query("DELETE FROM TermCodeSystemVersion csv WHERE csv.myCodeSystem = :cs") void deleteForCodeSystem(@Param("cs") TermCodeSystem theCodeSystem) -
findSortedPidsByCodeSystemPid
@Query("SELECT t.myPartitionIdValue, t.myId FROM TermCodeSystemVersion t WHERE t.myCodeSystemPid = :codesystem_pid order by t.myId") List<Object[]> findSortedPidsByCodeSystemPid(@Param("codesystem_pid") Long theCodeSystemPid) - Returns:
- Return type is [PartitionId,Pid]
-
findByCodeSystemPidAndVersion
@Query("SELECT cs FROM TermCodeSystemVersion cs WHERE cs.myCodeSystemPid = :codesystem_pid AND cs.myCodeSystemVersionId = :codesystem_version_id") TermCodeSystemVersion findByCodeSystemPidAndVersion(@Param("codesystem_pid") Long theCodeSystemPid, @Param("codesystem_version_id") String theCodeSystemVersionId) -
findByCodeSystemUriAndVersion
@Query("SELECT tcsv FROM TermCodeSystemVersion tcsv INNER JOIN FETCH TermCodeSystem tcs on tcs = tcsv.myCodeSystem WHERE tcs.myCodeSystemUri = :code_system_uri AND tcsv.myCodeSystemVersionId = :codesystem_version_id") TermCodeSystemVersion findByCodeSystemUriAndVersion(@Param("code_system_uri") String theCodeSystemUri, @Param("codesystem_version_id") String theCodeSystemVersionId) -
findByCodeSystemPidVersionIsNull
@Query("SELECT cs FROM TermCodeSystemVersion cs WHERE cs.myCodeSystemPid = :codesystem_pid AND cs.myCodeSystemVersionId IS NULL") TermCodeSystemVersion findByCodeSystemPidVersionIsNull(@Param("codesystem_pid") Long theCodeSystemPid) -
findByCodeSystemResourcePid
@Query("SELECT cs FROM TermCodeSystemVersion cs WHERE cs.myResource.myPid = :resource_id") List<TermCodeSystemVersion> findByCodeSystemResourcePid(@Param("resource_id") JpaPid theCodeSystemResourcePid) -
findCurrentVersionForCodeSystemResourcePid
@Query("SELECT csv FROM TermCodeSystemVersion csv JOIN TermCodeSystem cs ON (cs.myCurrentVersion = csv) WHERE cs.myResource.myPid.myId = :resource_id") TermCodeSystemVersion findCurrentVersionForCodeSystemResourcePid(@Param("resource_id") Long theCodeSystemResourcePid) -
findByPid
@Deprecated @Query("SELECT cs FROM TermCodeSystemVersion cs WHERE cs.myId = :pid") Optional<TermCodeSystemVersion> findByPid(@Param("pid") long theVersionPid) Deprecated.// TODO: JA2 Use partitioned query here
-