Package ca.uhn.fhir.rest.param
Class ReferenceParam
- java.lang.Object
-
- ca.uhn.fhir.rest.param.BaseParam
-
- ca.uhn.fhir.rest.param.ReferenceParam
-
- All Implemented Interfaces:
IQueryParameterType,Serializable
public class ReferenceParam extends BaseParam
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ReferenceParam()ConstructorReferenceParam(String theValue)ConstructorReferenceParam(String theChain, String theValue)ConstructorReferenceParam(String theResourceType, String theChain, String theValue)ConstructorReferenceParam(IIdType theValue)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetBaseUrl()StringgetChain()StringgetIdPart()BigDecimalgetIdPartAsBigDecimal()LonggetIdPartAsLong()StringgetResourceType()Class<? extends IBaseResource>getResourceType(FhirContext theCtx)StringgetValue()booleanhasResourceType()booleanisIdPartValidLong()protected booleanisSupportsChain()Does this parameter type support chained parameters (only reference should returntruefor this)ReferenceParamsetChain(String theChain)ReferenceParamsetValue(String theValue)Note that the parameter to this method must be a resource reference, e.g123orPatient/123orhttp://example.com/fhir/Patient/123or something like this.DateParamtoDateParam(FhirContext theContext)Returns a new param containing the same value as this param, but with the type copnverted toDateParam.NumberParamtoNumberParam(FhirContext theContext)Returns a new param containing the same value as this param, but with the type copnverted toNumberParam.QuantityParamtoQuantityParam(FhirContext theContext)Returns a new param containing the same value as this param, but with the type copnverted toQuantityParam.StringtoString()StringParamtoStringParam(FhirContext theContext)Returns a new param containing the same value as this param, but with the type copnverted toStringParam.TokenParamtoTokenParam(FhirContext theContext)Returns a new param containing the same value as this param, but with the type copnverted toTokenParam.-
Methods inherited from class ca.uhn.fhir.rest.param.BaseParam
getMissing, getQueryParameterQualifier, getValueAsQueryToken, setMissing, setValueAsQueryToken
-
-
-
-
Constructor Detail
-
ReferenceParam
public ReferenceParam()
Constructor
-
ReferenceParam
public ReferenceParam(String theValue)
Constructor
-
ReferenceParam
public ReferenceParam(String theChain, String theValue)
Constructor
-
ReferenceParam
public ReferenceParam(String theResourceType, String theChain, String theValue)
Constructor
-
ReferenceParam
public ReferenceParam(IIdType theValue)
Constructor- Since:
- 5.0.0
-
-
Method Detail
-
getBaseUrl
public String getBaseUrl()
-
setChain
public ReferenceParam setChain(String theChain)
-
getIdPartAsBigDecimal
public BigDecimal getIdPartAsBigDecimal()
-
getIdPartAsLong
public Long getIdPartAsLong()
-
getResourceType
public String getResourceType()
-
getResourceType
public Class<? extends IBaseResource> getResourceType(FhirContext theCtx)
-
setValue
public ReferenceParam setValue(String theValue)
Note that the parameter to this method must be a resource reference, e.g123orPatient/123orhttp://example.com/fhir/Patient/123or something like this. This is not appropriate for cases where a chain is being used and the value is for a different type of parameter (e.g. a token). In that case, use one of the setter constructors.
-
hasResourceType
public boolean hasResourceType()
-
isSupportsChain
protected boolean isSupportsChain()
Description copied from class:BaseParamDoes this parameter type support chained parameters (only reference should returntruefor this)- Overrides:
isSupportsChainin classBaseParam
-
toDateParam
public DateParam toDateParam(FhirContext theContext)
Returns a new param containing the same value as this param, but with the type copnverted toDateParam. This is useful if you are using reference parameters and want to handle chained parameters of different types in a single method.See Dynamic Chains in the HAPI FHIR documentation for an example of how to use this method.
-
toNumberParam
public NumberParam toNumberParam(FhirContext theContext)
Returns a new param containing the same value as this param, but with the type copnverted toNumberParam. This is useful if you are using reference parameters and want to handle chained parameters of different types in a single method.See Dynamic Chains in the HAPI FHIR documentation for an example of how to use this method.
-
toQuantityParam
public QuantityParam toQuantityParam(FhirContext theContext)
Returns a new param containing the same value as this param, but with the type copnverted toQuantityParam. This is useful if you are using reference parameters and want to handle chained parameters of different types in a single method.See Dynamic Chains in the HAPI FHIR documentation for an example of how to use this method.
-
toStringParam
public StringParam toStringParam(FhirContext theContext)
Returns a new param containing the same value as this param, but with the type copnverted toStringParam. This is useful if you are using reference parameters and want to handle chained parameters of different types in a single method.See Dynamic Chains in the HAPI FHIR documentation for an example of how to use this method.
-
toTokenParam
public TokenParam toTokenParam(FhirContext theContext)
Returns a new param containing the same value as this param, but with the type copnverted toTokenParam. This is useful if you are using reference parameters and want to handle chained parameters of different types in a single method.See Dynamic Chains in the HAPI FHIR documentation for an example of how to use this method.
-
isIdPartValidLong
public boolean isIdPartValidLong()
-
-