View Javadoc
1   package ca.uhn.fhir.rest.gclient;
2   
3   /*
4    * #%L
5    * HAPI FHIR - Core Library
6    * %%
7    * Copyright (C) 2014 - 2018 University Health Network
8    * %%
9    * Licensed under the Apache License, Version 2.0 (the "License");
10   * you may not use this file except in compliance with the License.
11   * You may obtain a copy of the License at
12   * 
13   *      http://www.apache.org/licenses/LICENSE-2.0
14   * 
15   * Unless required by applicable law or agreed to in writing, software
16   * distributed under the License is distributed on an "AS IS" BASIS,
17   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18   * See the License for the specific language governing permissions and
19   * limitations under the License.
20   * #L%
21   */
22  
23  import org.hl7.fhir.instance.model.api.IBaseResource;
24  import org.hl7.fhir.instance.model.api.IIdType;
25  
26  public interface IReadTyped<T extends IBaseResource> {
27  
28  	/**
29  	 * Perform a search by resource ID
30  	 * 
31  	 * @param theId The resource ID, e.g. "123"
32  	 */
33  	IReadExecutable<T> withId(String theId);
34  
35  	/**
36  	 * Perform a search by resource ID and version
37  	 * 
38  	 * @param theId The resource ID, e.g. "123"
39  	 * @param theVersion The resource version, eg. "5"
40  	 */
41  	IReadExecutable<T> withIdAndVersion(String theId, String theVersion);
42  
43  	/**
44  	 * Perform a search by resource ID
45  	 * 
46  	 * @param theId The resource ID, e.g. "123"
47  	 */
48  	IReadExecutable<T> withId(Long theId);
49  	
50  	/**
51  	 * Search using an ID. Note that even if theId contains a base URL it will be
52  	 * ignored in favour of the base url for the given client. If you want to specify 
53  	 * an absolute URL including a base and have that base used instead, use
54  	 * {@link #withUrl(IIdType)}
55  	 */
56  	IReadExecutable<T> withId(IIdType theId);
57  
58  	IReadExecutable<T> withUrl(String theUrl);
59  
60  	IReadExecutable<T> withUrl(IIdType theUrl);
61  
62  }