From f94f2fde65dd04716252ea05472696da4c2e1eab Mon Sep 17 00:00:00 2001
From: Tadgh
+ * Should searches use the integer field {@code SP_VALUE_LOW_DATE_ORDINAL} and {@code SP_VALUE_HIGH_DATE_ORDINAL} in
+ * {@link ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamDate} when resolving searches where all predicates are using
+ * precision of {@link ca.uhn.fhir.model.api.TemporalPrecisionEnum#DAY}.
+ *
+ * For example, if enabled, the search of {@code Observation?date=2020-02-25} will cause the date to be collapsed down to an
+ * ordinal {@code 20200225}. It would then be compared against {@link ResourceIndexedSearchParamDate#getValueLowDateOrdinal()}
+ * and {@link ResourceIndexedSearchParamDate#getValueHighDateOrdinal()}
+ *
+ * Should searches use the integer field {@code SP_VALUE_LOW_DATE_ORDINAL} and {@code SP_VALUE_HIGH_DATE_ORDINAL} in + * {@link ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamDate} when resolving searches where all predicates are using + * precision of {@link ca.uhn.fhir.model.api.TemporalPrecisionEnum#DAY}. + * + * For example, if enabled, the search of {@code Observation?date=2020-02-25} will cause the date to be collapsed down to an + * integer representing the ordinal date {@code 20200225}. It would then be compared against {@link ResourceIndexedSearchParamDate#getValueLowDateOrdinal()} + * and {@link ResourceIndexedSearchParamDate#getValueHighDateOrdinal()} + *
+ * Default is {@literal true} beginning in HAPI FHIR 5.0 + * + * + * @since 5.0 + */ + public boolean getUseOrdinalDatesForDayPrecisionSearches() { + return myModelConfig.getUseOrdinalDatesForDayPrecisionSearches(); + } /** * @see #setAllowInlineMatchUrlReferences(boolean) */ diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ModelConfig.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ModelConfig.java index f7616f58f1b..7aa6deb8ced 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ModelConfig.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ModelConfig.java @@ -381,10 +381,10 @@ public class ModelConfig { * ordinal {@code 20200225}. It would then be compared against {@link ResourceIndexedSearchParamDate#getValueLowDateOrdinal()} * and {@link ResourceIndexedSearchParamDate#getValueHighDateOrdinal()} * - * Default is {@literal true} beginning in HAPI FHIR 4.3. + * Default is {@literal true} beginning in HAPI FHIR 5.0 * * - * @since 4.3 + * @since 5.0 */ public void setUseOrdinalDatesForDayPrecisionSearches(boolean theUseOrdinalDates) { myUseOrdinalDatesForDayPrecisionSearches = theUseOrdinalDates; @@ -400,14 +400,15 @@ public class ModelConfig { * integer representing the ordinal date {@code 20200225}. It would then be compared against {@link ResourceIndexedSearchParamDate#getValueLowDateOrdinal()} * and {@link ResourceIndexedSearchParamDate#getValueHighDateOrdinal()} * - * Default is {@literal true} beginning in HAPI FHIR 4.3. + * Default is {@literal true} beginning in HAPI FHIR 5.0 * * - * @since 4.3 + * @since 5.0 */ public boolean getUseOrdinalDatesForDayPrecisionSearches() { return myUseOrdinalDatesForDayPrecisionSearches; } + private static void validateTreatBaseUrlsAsLocal(String theUrl) { Validate.notBlank(theUrl, "Base URL must not be null or empty");