1 package ca.uhn.fhir.model.api;
2
3 /*
4 * #%L
5 * HAPI FHIR - Core Library
6 * %%
7 * Copyright (C) 2014 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 ca.uhn.fhir.model.primitive.IdDt;
24
25 public interface IIdentifiableElement extends IElement {
26
27 /**
28 * Used to retrieve an ID for this specific element within a resource. These are used for IDREF referenced between
29 * elements within a single resource, and do not have any other purpose.
30 */
31 String getElementSpecificId();
32
33 /**
34 * @deprecated Use {@link #getElementSpecificId()} instead. This method will be removed because it is easily
35 * confused with other ID methods (such as patient#getIdentifier)
36 */
37 IdDt getId();
38
39 /**
40 * Used to set an ID for this specific element within a resource. These are used for IDREF referenced between
41 * elements within a single resource, and do not have any other purpose.
42 */
43 void setElementSpecificId(String theElementSpecificId);
44
45 /**
46 * @deprecated Use {@link #setElementSpecificId(String)} instead. This method will be removed because it is easily
47 * confused with other ID methods (such as patient#getIdentifier)
48 */
49 void setId(IdDt theId);
50
51 /**
52 * @deprecated Use {@link #setElementSpecificId(String)} instead. This method will be removed because it is easily
53 * confused with other ID methods (such as patient#getIdentifier)
54 */
55 void setId(String theId);
56
57 }