View Javadoc
1   package ca.uhn.fhir.rest.gclient;
2   
3   import org.hl7.fhir.instance.model.api.IBaseResource;
4   import org.hl7.fhir.instance.model.api.IIdType;
5   
6   /*
7    * #%L
8    * HAPI FHIR - Core Library
9    * %%
10   * Copyright (C) 2014 - 2018 University Health Network
11   * %%
12   * Licensed under the Apache License, Version 2.0 (the "License");
13   * you may not use this file except in compliance with the License.
14   * You may obtain a copy of the License at
15   * 
16   *      http://www.apache.org/licenses/LICENSE-2.0
17   * 
18   * Unless required by applicable law or agreed to in writing, software
19   * distributed under the License is distributed on an "AS IS" BASIS,
20   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21   * See the License for the specific language governing permissions and
22   * limitations under the License.
23   * #L%
24   */
25  
26  public interface IDelete {
27  
28  	IDeleteTyped resource(IBaseResource theResource);
29  	
30  	IDeleteTyped resourceById(IIdType theId);
31  	
32  	IDeleteTyped resourceById(String theResourceType, String theLogicalId);
33  
34  	/**
35  	 * Specifies that the delete should be performed as a conditional delete
36  	 * against a given search URL.
37  	 *
38  	 * @param theSearchUrl The search URL to use. The format of this URL should be of the form <code>[ResourceType]?[Parameters]</code>,
39  	 *                     for example: <code>Patient?name=Smith&amp;identifier=13.2.4.11.4%7C847366</code>
40  	 * @since HAPI 0.9 / FHIR DSTU 2
41  	 */
42  	IDeleteTyped resourceConditionalByUrl(String theSearchUrl);
43  
44  	/**
45  	 * Delete using a conditional/match URL. The query parameters will be added in the next part of the call chain.
46  	 * @since HAPI 0.9 / FHIR DSTU 2
47  	 */
48  	IDeleteWithQuery resourceConditionalByType(String theResourceType);
49  
50  	/**
51  	 * Delete using a conditional/match URL. The query parameters will be added in the next part of the call chain.
52  	 * @since HAPI 1.3
53  	 */
54  	IDeleteWithQuery resourceConditionalByType(Class<? extends IBaseResource> theResourceType);
55  
56  }