
001package ca.uhn.fhir.jpa.dao.data; 002 003import ca.uhn.fhir.jpa.entity.BulkExportCollectionEntity; 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 IBulkExportCollectionDao extends JpaRepository<BulkExportCollectionEntity, Long>, IHapiFhirJpaRepository { 030 031 @Modifying 032 @Query("DELETE FROM BulkExportCollectionEntity t") 033 void deleteAllFiles(); 034 035 @Modifying 036 @Query("DELETE FROM BulkExportCollectionEntity t WHERE t.myId = :pid") 037 void deleteByPid(@Param("pid") Long theId); 038}