
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 TypeMethodDescriptionbooleangetValue()inthashCode()booleanisEmpty()Returnstrueif no date/time is specified.Sets the value of the param to the given date (sets to themillisecondprecision, and will be encoded using the system local time zone).voidsetValue(IPrimitiveType<Date> theValue) Sets the value using a FHIR Date type, such as aDateDt, or a DateTimeType.voidsetValueAsString(String theDate) Accepts values with or without a prefix (e.g.voidsetValuesAsQueryTokens(FhirContext theContext, String theParamName, QualifiedParamList theParameters) toString()Methods inherited from class ca.uhn.fhir.rest.param.BaseParamWithPrefix
getPrefix, setPrefixMethods inherited from class ca.uhn.fhir.rest.param.BaseParam
getMissing, getQueryParameterQualifier, getValueAsQueryToken, isSupportsChain, setMissing, setValueAsQueryTokenMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:
getValuesAsQueryTokensin interfaceIQueryParameterOr<DateParam>
-
isEmpty
Returnstrueif 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:
isEmptyin interfaceIQueryParameterType- Overrides:
isEmptyin classBaseParam
-
setValue
Sets the value of the param to the given date (sets to themillisecondprecision, 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-01and2011-01-01). If no prefix is provided in the given value, theexisting prefixis preserved -
setValuesAsQueryTokens
public void setValuesAsQueryTokens(FhirContext theContext, String theParamName, QualifiedParamList theParameters) - Specified by:
setValuesAsQueryTokensin interfaceIQueryParameterOr<DateParam>
-
equals
- Overrides:
equalsin classBaseParamWithPrefix<DateParam>
-
hashCode
- Overrides:
hashCodein classBaseParamWithPrefix<DateParam>
-
toString
-