/** * Accepts values with or without a prefix (e.g. <code>gt2011-01-01</code> and <code>2011-01-01</code>). * If no prefix is provided in the given value, the {@link #getPrefix() existing prefix} is preserved */ public void setValueAsString(String theDate) { if (isNotBlank(theDate)) { ParamPrefixEnum existingPrefix = getPrefix(); myValue.setValueAsString(super.extractPrefixAndReturnRest(theDate)); if (getPrefix() == null) { setPrefix(existingPrefix); } } else { myValue.setValue(null); } }
/** * Accepts values with or without a prefix (e.g. <code>gt2011-01-01</code> and <code>2011-01-01</code>). * If no prefix is provided in the given value, the {@link #getPrefix() existing prefix} is preserved */ public void setValueAsString(String theDate) { if (isNotBlank(theDate)) { ParamPrefixEnum existingPrefix = getPrefix(); myValue.setValueAsString(super.extractPrefixAndReturnRest(theDate)); if (getPrefix() == null) { setPrefix(existingPrefix); } } else { myValue.setValue(null); } }
/** * Sets the value using a FHIR Date type, such as a {@link DateDt}, or a DateTimeType. */ public void setValue(IPrimitiveType<Date> theValue) { if (theValue != null) { myValue.setValueAsString(theValue.getValueAsString()); } else { myValue.setValue(null); } }
/** * Sets the value of the param to the given date (sets to the {@link TemporalPrecisionEnum#MILLI millisecond} * precision, and will be encoded using the system local time zone). */ public DateParam setValue(Date theValue) { myValue.setValue(theValue, TemporalPrecisionEnum.MILLI); return this; }
/** * Sets the value of the param to the given date (sets to the {@link TemporalPrecisionEnum#MILLI millisecond} * precision, and will be encoded using the system local time zone). */ public DateParam setValue(Date theValue) { myValue.setValue(theValue, TemporalPrecisionEnum.MILLI); return this; }
/** * Sets the value using a FHIR Date type, such as a {@link DateDt}, or a DateTimeType. */ public void setValue(IPrimitiveType<Date> theValue) { if (theValue != null) { myValue.setValueAsString(theValue.getValueAsString()); } else { myValue.setValue(null); } }