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 StringDtgetDisplayElement()abstract IdDtgetReference()IBaseResourcegetResource()Gets the actual loaded and parsed resource instance, if it is already present.protected booleanisBaseEmpty()Intended to be called by extending classesIBase.isEmpty()implementations, returnstrueif all content in this superclass instance is empty per the semantics ofIBase.isEmpty().IBaseResourceloadResource(IRestfulClient theClient)Returns the referenced resource, fetching it if it has not already been loaded.abstract BaseResourceReferenceDtsetReference(IdDt theReference)BaseResourceReferenceDtsetReference(IIdType theReference)BaseResourceReferenceDtsetResource(IBaseResource theResource)StringtoString()-
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:
getDisplayElementin 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:
getResourcein interfaceIBaseReference- See Also:
loadResource(IRestfulClient)
-
isBaseEmpty
protected boolean isBaseEmpty()
Description copied from class:BaseElementIntended to be called by extending classesIBase.isEmpty()implementations, returnstrueif all content in this superclass instance is empty per the semantics ofIBase.isEmpty().- Overrides:
isBaseEmptyin 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:
setResourcein interfaceIBaseReference
-
-