
001package ca.uhn.fhir.jpa.dao.data; 002 003import ca.uhn.fhir.jpa.entity.TermConceptProperty; 004import org.springframework.data.jpa.repository.JpaRepository; 005import org.springframework.data.jpa.repository.Modifying; 006import org.springframework.data.jpa.repository.Query; 007import org.springframework.data.repository.query.Param; 008 009/* 010 * #%L 011 * HAPI FHIR JPA Server 012 * %% 013 * Copyright (C) 2014 - 2022 Smile CDR, Inc. 014 * %% 015 * Licensed under the Apache License, Version 2.0 (the "License"); 016 * you may not use this file except in compliance with the License. 017 * You may obtain a copy of the License at 018 * 019 * http://www.apache.org/licenses/LICENSE-2.0 020 * 021 * Unless required by applicable law or agreed to in writing, software 022 * distributed under the License is distributed on an "AS IS" BASIS, 023 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 024 * See the License for the specific language governing permissions and 025 * limitations under the License. 026 * #L% 027 */ 028 029public interface ITermConceptPropertyDao extends JpaRepository<TermConceptProperty, Long>, IHapiFhirJpaRepository { 030 031 @Modifying 032 @Query("DELETE FROM TermConceptProperty WHERE myCodeSystemVersion.myId = :cs_pid") 033 int deleteByCodeSystemVersion(@Param("cs_pid") Long thePid); 034 035 @Query("SELECT COUNT(t) FROM TermConceptProperty t WHERE t.myCodeSystemVersion.myId = :cs_pid") 036 Integer countByCodeSystemVersion(@Param("cs_pid") Long thePid); 037 038}