@Test public void fetchDateValue() { SolrDocument doc = new SolrDocument(); Date date = new Date(1396310400000L); doc.addField("judgmentDate", date); LocalDate actualDate = fieldFetcher.fetchDateValue(doc, JudgmentIndexField.JUDGMENT_DATE); LocalDate expectedDate = new LocalDate(2014, 4, 1); assertEquals(expectedDate, actualDate); }
public LocalDate fetchDateValue(SolrDocument doc, F field) { Object value = doc.getFirstValue(field.getFieldName()); if (value == null) { return null; } Date dateValue = (Date) value; return new LocalDate(dateValue.getTime()); }
SolrFieldFetcher { public LocalDate fetchDateValue(SolrDocument doc, F field) { Object value = doc.getFirstValue(field.getFieldName()); if (value == null) { return null; } Date dateValue = (Date) value; return new LocalDate(dateValue.getTime()); } }
SolrFieldFetcher { public LocalDate fetchDateValue(SolrDocument doc, F field) { Object value = doc.getFirstValue(field.getFieldName()); if (value == null) { return null; } Date dateValue = (Date) value; return new LocalDate(dateValue.getTime()); }  }
SolrFieldFetcher { public LocalDate fetchDateValue(SolrDocument doc, F field) { Object value = doc.getFirstValue(field.getFieldName()); if (value == null) { return null; } Date dateValue = (Date) value; return new LocalDate(dateValue.getTime()); }  String fetchValue(SolrDocument doc, F field); Long fetchLongValue(SolrDocument doc, F field); BigDecimal fetchCurrencyValue(SolrDocument doc, F field); LocalDate fetchDateValue(SolrDocument doc, F field); List<String> fetchValues(SolrDocument doc, F field); List<String> fetchValues(SolrDocument doc, F field, String postfix); List<Pair<String, List<String>>> fetchValuesWithAttributes(SolrDocument doc, F field); List<Pair<String, List<E>>> fetchValuesWithEnumedAttributes(SolrDocument doc, F field, Class<E> allowedAttributes); }
SolrFieldFetcher { public LocalDate fetchDateValue(SolrDocument doc, F field) { Object value = doc.getFirstValue(field.getFieldName()); if (value == null) { return null; } Date dateValue = (Date) value; return new LocalDate(dateValue.getTime()); }  String fetchValue(SolrDocument doc, F field); Long fetchLongValue(SolrDocument doc, F field); BigDecimal fetchCurrencyValue(SolrDocument doc, F field); LocalDate fetchDateValue(SolrDocument doc, F field); List<String> fetchValues(SolrDocument doc, F field); List<String> fetchValues(SolrDocument doc, F field, String postfix); List<Pair<String, List<String>>> fetchValuesWithAttributes(SolrDocument doc, F field); List<Pair<String, List<E>>> fetchValuesWithEnumedAttributes(SolrDocument doc, F field, Class<E> allowedAttributes);  }