
Package ca.uhn.fhir.rest.param
Class DateParam
- All Implemented Interfaces:
IQueryParameterOr<DateParam>
,IQueryParameterType
,Serializable
public class DateParam
extends BaseParamWithPrefix<DateParam>
implements IQueryParameterOr<DateParam>
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class ca.uhn.fhir.rest.param.BaseParamWithPrefix
MSG_PREFIX_INVALID_FORMAT
-
Constructor Summary
ConstructorsConstructorDescriptionConstructorDateParam
(ParamPrefixEnum thePrefix, long theDate) ConstructorDateParam
(ParamPrefixEnum thePrefix, DateTimeDt theDate) ConstructorDateParam
(ParamPrefixEnum thePrefix, String theDate) ConstructorDateParam
(ParamPrefixEnum thePrefix, Date theDate) ConstructorDateParam
(ParamPrefixEnum thePrefix, IPrimitiveType<Date> theDate) ConstructorConstructor which takes a complete [qualifier]{date} string. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getValue()
int
hashCode()
boolean
isEmpty()
Returnstrue
if no date/time is specified.Sets the value of the param to the given date (sets to themillisecond
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 aDateDt
, or a DateTimeType.void
setValueAsString
(String theDate) Accepts values with or without a prefix (e.g.void
setValuesAsQueryTokens
(FhirContext theContext, String theParamName, QualifiedParamList theParameters) toString()
Methods inherited from class ca.uhn.fhir.rest.param.BaseParamWithPrefix
getPrefix, setPrefix
Methods inherited from class ca.uhn.fhir.rest.param.BaseParam
getMissing, getQueryParameterQualifier, getValueAsQueryToken, isSupportsChain, setMissing, setValueAsQueryToken
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ca.uhn.fhir.model.api.IQueryParameterType
getValueAsQueryToken
-
Constructor Details
-
DateParam
public DateParam()Constructor -
DateParam
Constructor -
DateParam
Constructor -
DateParam
Constructor -
DateParam
Constructor -
DateParam
Constructor -
DateParam
Constructor which takes a complete [qualifier]{date} string.- Parameters:
theString
- The string
-
-
Method Details
-
getPrecision
-
getValue
-
getValueAsString
-
getValuesAsQueryTokens
- Specified by:
getValuesAsQueryTokens
in interfaceIQueryParameterOr<DateParam>
-
isEmpty
Returnstrue
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.- Specified by:
isEmpty
in interfaceIQueryParameterType
- Overrides:
isEmpty
in classBaseParam
-
setValue
Sets the value of the param to the given date (sets to themillisecond
precision, and will be encoded using the system local time zone). -
setValue
Sets the value using a FHIR Date type, such as aDateDt
, or a DateTimeType. -
setValueAsString
Accepts values with or without a prefix (e.g.gt2011-01-01
and2011-01-01
). If no prefix is provided in the given value, theexisting prefix
is preserved -
setValuesAsQueryTokens
public void setValuesAsQueryTokens(FhirContext theContext, String theParamName, QualifiedParamList theParameters) - Specified by:
setValuesAsQueryTokens
in interfaceIQueryParameterOr<DateParam>
-
equals
-
hashCode
-
toString
-