
Package ca.uhn.fhir.model.base.composite
Class BaseResourceReferenceDt
- java.lang.Object
-
- ca.uhn.fhir.model.api.BaseElement
-
- ca.uhn.fhir.model.api.BaseIdentifiableElement
-
- ca.uhn.fhir.model.base.composite.BaseResourceReferenceDt
-
- All Implemented Interfaces:
IElement
,IIdentifiableElement
,ISupportsUndeclaredExtensions
,Serializable
,IBase
,IBaseDatatype
,IBaseReference
,ICompositeType
public abstract class BaseResourceReferenceDt extends BaseIdentifiableElement implements IBaseDatatype, IBaseReference
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BaseResourceReferenceDt()
ConstructorBaseResourceReferenceDt(IResource theResource)
Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract StringDt
getDisplayElement()
abstract IdDt
getReference()
IBaseResource
getResource()
Gets the actual loaded and parsed resource instance, if it is already present.protected boolean
isBaseEmpty()
Intended to be called by extending classesIBase.isEmpty()
implementations, returnstrue
if all content in this superclass instance is empty per the semantics ofIBase.isEmpty()
.IBaseResource
loadResource(IRestfulClient theClient)
Returns the referenced resource, fetching it if it has not already been loaded.abstract BaseResourceReferenceDt
setReference(IdDt theReference)
BaseResourceReferenceDt
setReference(IIdType theReference)
BaseResourceReferenceDt
setResource(IBaseResource theResource)
String
toString()
-
Methods inherited from class ca.uhn.fhir.model.api.BaseIdentifiableElement
getElementSpecificId, getId, setElementSpecificId, setId, setId
-
Methods inherited from class ca.uhn.fhir.model.api.BaseElement
addUndeclaredExtension, addUndeclaredExtension, addUndeclaredExtension, getAllUndeclaredExtensions, getFormatCommentsPost, getFormatCommentsPre, getUndeclaredExtensions, getUndeclaredExtensionsByUrl, getUndeclaredModifierExtensions, getUserData, hasFormatComment, setUserData
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hl7.fhir.instance.model.api.IBase
fhirType, getFormatCommentsPost, getFormatCommentsPre, getUserData, hasFormatComment, isEmpty, setUserData
-
Methods inherited from interface org.hl7.fhir.instance.model.api.IBaseReference
getReferenceElement, hasIdentifier, setDisplay, setReference
-
-
-
-
Constructor Detail
-
BaseResourceReferenceDt
public BaseResourceReferenceDt()
Constructor
-
BaseResourceReferenceDt
public BaseResourceReferenceDt(IResource theResource)
Constructor- Parameters:
theResource
- The loaded resource itself
-
-
Method Detail
-
getDisplayElement
public abstract StringDt getDisplayElement()
- Specified by:
getDisplayElement
in interfaceIBaseReference
-
getReference
public abstract IdDt getReference()
-
getResource
public IBaseResource getResource()
Gets the actual loaded and parsed resource instance, if it is already present. This method will return the resource instance only if it has previously been loaded usingloadResource(IRestfulClient)
or it was contained within the resource containing this resource. See the FHIR specification section on contained resources for more information.- Specified by:
getResource
in interfaceIBaseReference
- See Also:
loadResource(IRestfulClient)
-
isBaseEmpty
protected boolean isBaseEmpty()
Description copied from class:BaseElement
Intended to be called by extending classesIBase.isEmpty()
implementations, returnstrue
if all content in this superclass instance is empty per the semantics ofIBase.isEmpty()
.- Overrides:
isBaseEmpty
in classBaseElement
-
loadResource
public IBaseResource loadResource(IRestfulClient theClient)
Returns the referenced resource, fetching it if it has not already been loaded. This method invokes the HTTP client to retrieve the resource unless it has already been loaded, or was a contained resource in which case it is simply returned.
-
setReference
public abstract BaseResourceReferenceDt setReference(IdDt theReference)
-
setReference
public BaseResourceReferenceDt setReference(IIdType theReference)
-
setResource
public BaseResourceReferenceDt setResource(IBaseResource theResource)
- Specified by:
setResource
in interfaceIBaseReference
-
-