public class DateParam extends BaseParamWithPrefix<DateParam> implements IQueryParameterOr<DateParam>
Modifier and Type | Class and Description |
---|---|
static class |
DateParam.DateParamDateTimeHolder |
Constructor and Description |
---|
DateParam()
Constructor
|
DateParam(ParamPrefixEnum thePrefix,
Date theDate)
Constructor
|
DateParam(ParamPrefixEnum thePrefix,
DateTimeDt theDate)
Constructor
|
DateParam(ParamPrefixEnum thePrefix,
IPrimitiveType<Date> theDate)
Constructor
|
DateParam(ParamPrefixEnum thePrefix,
long theDate)
Constructor
|
DateParam(ParamPrefixEnum thePrefix,
String theDate)
Constructor
|
DateParam(String theString)
Constructor which takes a complete [qualifier]{date} string.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
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
|
TemporalPrecisionEnum |
getPrecision() |
String |
getQueryParameterQualifier()
This method will return any qualifier that should be appended to the parameter name (e.g ":exact").
|
Date |
getValue() |
DateTimeDt |
getValueAsDateTimeDt() |
InstantDt |
getValueAsInstantDt() |
String |
getValueAsQueryToken(FhirContext theContext)
Returns a representation of this parameter's value as it will be represented "over the wire".
|
String |
getValueAsString() |
List<DateParam> |
getValuesAsQueryTokens() |
int |
hashCode() |
boolean |
isEmpty()
Returns
true if no date/time is specified. |
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
|
DateParam |
setValue(Date theValue)
Sets the value of the param to the given date (sets to the
millisecond
precision, and will be encoded using the system local time zone). |
void |
setValue(IPrimitiveType<Date> theValue)
Sets the value using a FHIR Date type, such as a
DateDt , or a DateTimeType. |
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.
|
void |
setValueAsString(String theDate)
Accepts values with or without a prefix (e.g.
|
void |
setValuesAsQueryTokens(FhirContext theContext,
String theParamName,
QualifiedParamList theParameters) |
String |
toString() |
getPrefix, setPrefix
public DateParam()
public DateParam(ParamPrefixEnum thePrefix, Date theDate)
public DateParam(ParamPrefixEnum thePrefix, DateTimeDt theDate)
public DateParam(ParamPrefixEnum thePrefix, IPrimitiveType<Date> theDate)
public DateParam(ParamPrefixEnum thePrefix, long theDate)
public DateParam(ParamPrefixEnum thePrefix, String theDate)
public DateParam(String theString)
theString
- The stringpublic TemporalPrecisionEnum getPrecision()
public Date getValue()
public DateTimeDt getValueAsDateTimeDt()
public InstantDt getValueAsInstantDt()
public String getValueAsString()
public List<DateParam> getValuesAsQueryTokens()
getValuesAsQueryTokens
in interface IQueryParameterOr<DateParam>
public boolean isEmpty()
true
if no date/time is specified. Note that this method does not check the comparator, so a
QualifiedDateParam with only a comparator and no date/time is considered empty.public DateParam setValue(Date theValue)
millisecond
precision, and will be encoded using the system local time zone).public void setValue(IPrimitiveType<Date> theValue)
DateDt
, or a DateTimeType.public void setValueAsString(String theDate)
gt2011-01-01
and 2011-01-01
).
If no prefix is provided in the given value, the existing prefix
is preservedpublic void setValuesAsQueryTokens(FhirContext theContext, String theParamName, QualifiedParamList theParameters)
setValuesAsQueryTokens
in interface IQueryParameterOr<DateParam>
public Boolean getMissing()
getMissing
in interface IQueryParameterType
public final String getQueryParameterQualifier()
IQueryParameterType
getQueryParameterQualifier
in interface IQueryParameterType
public final String getValueAsQueryToken(FhirContext theContext)
IQueryParameterType
See FHIR specification 2.2.2 Search SearchParameter Types for information on the token format
getValueAsQueryToken
in interface IQueryParameterType
theContext
- TODOprotected boolean isSupportsChain()
true
for this)public ca.uhn.fhir.rest.param.BaseParam setMissing(Boolean theMissing)
setMissing
in interface IQueryParameterType
this
for easier method chainingpublic final void setValueAsQueryToken(FhirContext theContext, String theParamName, String theQualifier, String theValue)
IQueryParameterType
See FHIR specification 2.2.2 Search SearchParameter Types for information on the token format
setValueAsQueryToken
in interface IQueryParameterType
theContext
- 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–2019 University Health Network. All rights reserved.