@Test public void transformToDateRangeCriterion() { String actual = criterionTransformer.transformToDateRangeCriterion( JudgmentIndexField.JUDGMENT_DATE, new LocalDate(2012, 9, 23), new LocalDate(2013, 2, 6)); assertEquals("+judgmentDate:[2012-09-23T00:00:00Z TO 2013-02-06T23:59:59Z]", actual); }
public String transformToDateRangeCriterion(F field, LocalDate from, LocalDate to) { if (from == null && to == null) { return StringUtils.EMPTY; } String fromString = null; String toString = null; if (from != null) { fromString = SearchDateTimeUtils.convertDateToISOString(from); } if (to != null) { toString = SearchDateTimeUtils.convertDateToISOStringAtEndOfDay(to); } return transformToRangeCriterion(field, fromString, toString); }
SolrCriterionTransformer { public String transformToDateRangeCriterion(F field, LocalDate from, LocalDate to) { if (from == null && to == null) { return StringUtils.EMPTY; } String fromString = null; String toString = null; if (from != null) { fromString = SearchDateTimeUtils.convertDateToISOString(from); } if (to != null) { toString = SearchDateTimeUtils.convertDateToISOStringAtEndOfDay(to); } return transformToRangeCriterion(field, fromString, toString); } }
SolrCriterionTransformer { public String transformToDateRangeCriterion(F field, LocalDate from, LocalDate to) { if (from == null && to == null) { return StringUtils.EMPTY; } String fromString = null; String toString = null; if (from != null) { fromString = SearchDateTimeUtils.convertDateToISOString(from); } if (to != null) { toString = SearchDateTimeUtils.convertDateToISOStringAtEndOfDay(to); } return transformToRangeCriterion(field, fromString, toString); }  }
SolrCriterionTransformer { public String transformToDateRangeCriterion(F field, LocalDate from, LocalDate to) { if (from == null && to == null) { return StringUtils.EMPTY; } String fromString = null; String toString = null; if (from != null) { fromString = SearchDateTimeUtils.convertDateToISOString(from); } if (to != null) { toString = SearchDateTimeUtils.convertDateToISOStringAtEndOfDay(to); } return transformToRangeCriterion(field, fromString, toString); }  String transformToEqualsCriterionWithParsing(F field, String value); String transformToEqualsCriterion(F field, String value); String transformToEqualsCriterion(F field, String value, Operator operator); String transformToEqualsCriterion(F field, Integer value); String transformToEqualsCriterion(F field, Long value); String transformToEqualsCriterion(F field, Enum<?> enumValue); String transformToEqualsCriteria(F field, List<String> values, Operator operator); String transformToEqualsEnumCriteria(F field, List<? extends Enum<?>> values, Operator operator); String transformToDateRangeCriterion(F field, LocalDate from, LocalDate to); String transformToRangeCriterion(F field, String from, String to); String and(String criterion); String join(List<String> criteria); }
SolrCriterionTransformer { public String transformToDateRangeCriterion(F field, LocalDate from, LocalDate to) { if (from == null && to == null) { return StringUtils.EMPTY; } String fromString = null; String toString = null; if (from != null) { fromString = SearchDateTimeUtils.convertDateToISOString(from); } if (to != null) { toString = SearchDateTimeUtils.convertDateToISOStringAtEndOfDay(to); } return transformToRangeCriterion(field, fromString, toString); }  String transformToEqualsCriterionWithParsing(F field, String value); String transformToEqualsCriterion(F field, String value); String transformToEqualsCriterion(F field, String value, Operator operator); String transformToEqualsCriterion(F field, Integer value); String transformToEqualsCriterion(F field, Long value); String transformToEqualsCriterion(F field, Enum<?> enumValue); String transformToEqualsCriteria(F field, List<String> values, Operator operator); String transformToEqualsEnumCriteria(F field, List<? extends Enum<?>> values, Operator operator); String transformToDateRangeCriterion(F field, LocalDate from, LocalDate to); String transformToRangeCriterion(F field, String from, String to); String and(String criterion); String join(List<String> criteria);  }