public class QuantityParam extends BaseParamWithPrefix<QuantityParam> implements IQueryParameterType
| Constructor and Description |
|---|
QuantityParam()
Constructor
|
QuantityParam(long theQuantity)
Constructor
|
QuantityParam(ParamPrefixEnum thePrefix,
BigDecimal theValue,
String theSystem,
String theUnits)
Constructor
|
QuantityParam(ParamPrefixEnum thePrefix,
double theValue,
String theSystem,
String theUnits)
Constructor
|
QuantityParam(ParamPrefixEnum thePrefix,
long theValue,
String theSystem,
String theUnits)
Constructor
|
QuantityParam(String theQuantity)
Constructor
|
QuantityParam(String theQuantity,
String theSystem,
String theUnits)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
Boolean |
getMissing()
If set to non-null value, indicates that this parameter has been populated with a "[name]:missing=true" or "[name]:missing=false" vale instead of a normal value
|
String |
getQueryParameterQualifier()
This method will return any qualifier that should be appended to the parameter name (e.g ":exact")
|
String |
getSystem()
Returns the system, or null if none was provided
|
UriDt |
getSystemAsUriDt()
Deprecated.
Use {
getSystem()} instead |
String |
getUnits() |
BigDecimal |
getValue()
Returns the quantity/value, or null if none was provided
|
String |
getValueAsQueryToken(FhirContext theContext)
Returns a representation of this parameter's value as it will be represented "over the wire".
|
String |
getValueAsString() |
protected boolean |
isSupportsChain()
Does this parameter type support chained parameters (only reference should return
true for this) |
ca.uhn.fhir.rest.param.BaseParam |
setMissing(Boolean theMissing)
If set to non-null value, indicates that this parameter has been populated
with a "[name]:missing=true" or "[name]:missing=false" vale instead of a
normal value
|
QuantityParam |
setSystem(IPrimitiveType<String> theSystem) |
QuantityParam |
setSystem(String theSystem) |
QuantityParam |
setUnits(String theUnits) |
QuantityParam |
setValue(BigDecimal theValue) |
QuantityParam |
setValue(double theValue) |
QuantityParam |
setValue(IPrimitiveType<BigDecimal> theValue) |
QuantityParam |
setValue(long theValue) |
QuantityParam |
setValue(String theValue) |
void |
setValueAsQueryToken(FhirContext theContext,
String theParamName,
String theQualifier,
String theValue)
This method is generally only called by HAPI itself, and should not need to be called from user code.
|
String |
toString() |
getPrefix, setPrefixclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetMissing, getQueryParameterQualifier, getValueAsQueryToken, setMissing, setValueAsQueryTokenpublic QuantityParam()
public QuantityParam(ParamPrefixEnum thePrefix, BigDecimal theValue, String theSystem, String theUnits)
thePrefix - The comparator, or null for an equals comparatortheValue - A quantity valuetheSystem - The unit systemtheUnits - The unit codepublic QuantityParam(ParamPrefixEnum thePrefix, double theValue, String theSystem, String theUnits)
thePrefix - The comparator, or null for an equals comparatortheValue - A quantity valuetheSystem - The unit systemtheUnits - The unit codepublic QuantityParam(ParamPrefixEnum thePrefix, long theValue, String theSystem, String theUnits)
thePrefix - The comparator, or null for an equals comparatortheValue - A quantity valuetheSystem - The unit systemtheUnits - The unit codepublic QuantityParam(String theQuantity)
theQuantity - A quantity value (with no system or units), such as "100.0" or "gt4"public QuantityParam(long theQuantity)
theQuantity - A quantity value (with no system or units), such as 100public QuantityParam(String theQuantity, String theSystem, String theUnits)
theQuantity - A quantity value (with no system or units), such as "100.0" or "<=4"theSystem - The unit systemtheUnits - The unit codepublic String getValueAsString()
public String getSystem()
Note that prior to HAPI FHIR 1.5, this method returned a UriDt
@Deprecated public UriDt getSystemAsUriDt()
getSystem()} insteadpublic BigDecimal getValue()
Note that prior to HAPI FHIR 1.5, this method returned a DecimalDt
public QuantityParam setSystem(String theSystem)
public QuantityParam setSystem(IPrimitiveType<String> theSystem)
public QuantityParam setUnits(String theUnits)
public QuantityParam setValue(BigDecimal theValue)
public QuantityParam setValue(IPrimitiveType<BigDecimal> theValue)
public QuantityParam setValue(String theValue)
public QuantityParam setValue(double theValue)
public QuantityParam setValue(long theValue)
public Boolean getMissing()
getMissing in interface IQueryParameterTypepublic final String getQueryParameterQualifier()
IQueryParameterTypegetQueryParameterQualifier in interface IQueryParameterTypepublic final String getValueAsQueryToken(FhirContext theContext)
IQueryParameterTypeSee FHIR specification 2.2.2 Search SearchParameter Types for information on the token format
getValueAsQueryToken in interface IQueryParameterTypetheContext - TODOprotected boolean isSupportsChain()
true for this)public ca.uhn.fhir.rest.param.BaseParam setMissing(Boolean theMissing)
setMissing in interface IQueryParameterTypethis for easier method chainingpublic final void setValueAsQueryToken(FhirContext theContext, String theParamName, String theQualifier, String theValue)
IQueryParameterTypeSee FHIR specification 2.2.2 Search SearchParameter Types for information on the token format
setValueAsQueryToken in interface IQueryParameterTypetheContext - TODOtheParamName - TODOtheQualifier - The parameter name qualifier that accompanied this value. For example, if the complete query was
http://foo?name:exact=John, qualifier would be ":exact"theValue - The actual parameter value. For example, if the complete query was
http://foo?name:exact=John, the value would be "John"Copyright © 2014–2017 University Health Network. All rights reserved.