@Test(expected = NullPointerException.class) public void convert_XSettings() { converter.convert("XYZ", null); }
@Override public MonthPeriod convert(String value, XSettings xsettings) { Preconditions.checkNotNull(value); Preconditions.checkNotNull(xsettings); LocalDate startDate = SearchDateTimeUtils.convertISOStringToDate(value); Period period = xdateRangeUtils.getDateRange(xsettings).getGap(); LocalDate endDate = xdateRangeUtils.generateEndDate(startDate, period); return new MonthPeriod(startDate.getYear(), startDate.getMonthOfYear(), endDate.getYear(), endDate.getMonthOfYear()); }
FacetMonthPeriodValueConverter implements FacetValueConverter { @Override public MonthPeriod convert(String value, XSettings xsettings) { Preconditions.checkNotNull(value); Preconditions.checkNotNull(xsettings); LocalDate startDate = SearchDateTimeUtils.convertISOStringToDate(value); Period period = xdateRangeUtils.getDateRange(xsettings).getGap(); LocalDate endDate = xdateRangeUtils.generateEndDate(startDate, period); return new MonthPeriod(startDate.getYear(), startDate.getMonthOfYear(), endDate.getYear(), endDate.getMonthOfYear()); } }
FacetMonthPeriodValueConverter implements FacetValueConverter { @Override public MonthPeriod convert(String value, XSettings xsettings) { Preconditions.checkNotNull(value); Preconditions.checkNotNull(xsettings); LocalDate startDate = SearchDateTimeUtils.convertISOStringToDate(value); Period period = xdateRangeUtils.getDateRange(xsettings).getGap(); LocalDate endDate = xdateRangeUtils.generateEndDate(startDate, period); return new MonthPeriod(startDate.getYear(), startDate.getMonthOfYear(), endDate.getYear(), endDate.getMonthOfYear()); }  }
FacetMonthPeriodValueConverter implements FacetValueConverter { @Override public MonthPeriod convert(String value, XSettings xsettings) { Preconditions.checkNotNull(value); Preconditions.checkNotNull(xsettings); LocalDate startDate = SearchDateTimeUtils.convertISOStringToDate(value); Period period = xdateRangeUtils.getDateRange(xsettings).getGap(); LocalDate endDate = xdateRangeUtils.generateEndDate(startDate, period); return new MonthPeriod(startDate.getYear(), startDate.getMonthOfYear(), endDate.getYear(), endDate.getMonthOfYear()); }  @Override MonthPeriod convert(String value, XSettings xsettings); @Override boolean handles(XSettings xsettings); @Autowired void setXdateRangeUtils(XDateRangeUtils xdateRangeUtils); }
FacetMonthPeriodValueConverter implements FacetValueConverter { @Override public MonthPeriod convert(String value, XSettings xsettings) { Preconditions.checkNotNull(value); Preconditions.checkNotNull(xsettings); LocalDate startDate = SearchDateTimeUtils.convertISOStringToDate(value); Period period = xdateRangeUtils.getDateRange(xsettings).getGap(); LocalDate endDate = xdateRangeUtils.generateEndDate(startDate, period); return new MonthPeriod(startDate.getYear(), startDate.getMonthOfYear(), endDate.getYear(), endDate.getMonthOfYear()); }  @Override MonthPeriod convert(String value, XSettings xsettings); @Override boolean handles(XSettings xsettings); @Autowired void setXdateRangeUtils(XDateRangeUtils xdateRangeUtils);  }