@Test public void testOverritingDates() { DateRangeAndType last7Days = DateRangeAndType.fromValues(null, null, ReportDefinitionDateRangeType.LAST_7_DAYS); testDateRange(last7Days, "20130925", "20131001"); }
public static DateRangeAndType fromValues(LocalDate startDate, LocalDate endDate, ReportDefinitionDateRangeType type) { if (startDate != null && endDate != null) { return new DateRangeAndType(startDate, endDate, ReportDefinitionDateRangeType.CUSTOM_DATE); } else if (type != null && type != ReportDefinitionDateRangeType.CUSTOM_DATE) { return parseEnumFormat(type); } else { throw new IllegalArgumentException( "Must provide either: 'startDate' and 'endData', or 'type'."); } }
DateRangeAndType { public static DateRangeAndType fromValues(LocalDate startDate, LocalDate endDate, ReportDefinitionDateRangeType type) { if (startDate != null && endDate != null) { return new DateRangeAndType(startDate, endDate, ReportDefinitionDateRangeType.CUSTOM_DATE); } else if (type != null && type != ReportDefinitionDateRangeType.CUSTOM_DATE) { return parseEnumFormat(type); } else { throw new IllegalArgumentException( "Must provide either: 'startDate' and 'endData', or 'type'."); } } }
DateRangeAndType { public static DateRangeAndType fromValues(LocalDate startDate, LocalDate endDate, ReportDefinitionDateRangeType type) { if (startDate != null && endDate != null) { return new DateRangeAndType(startDate, endDate, ReportDefinitionDateRangeType.CUSTOM_DATE); } else if (type != null && type != ReportDefinitionDateRangeType.CUSTOM_DATE) { return parseEnumFormat(type); } else { throw new IllegalArgumentException( "Must provide either: 'startDate' and 'endData', or 'type'."); } } private  DateRangeAndType(
      LocalDate startDate, LocalDate endDate, ReportDefinitionDateRangeType type); }
DateRangeAndType { public static DateRangeAndType fromValues(LocalDate startDate, LocalDate endDate, ReportDefinitionDateRangeType type) { if (startDate != null && endDate != null) { return new DateRangeAndType(startDate, endDate, ReportDefinitionDateRangeType.CUSTOM_DATE); } else if (type != null && type != ReportDefinitionDateRangeType.CUSTOM_DATE) { return parseEnumFormat(type); } else { throw new IllegalArgumentException( "Must provide either: 'startDate' and 'endData', or 'type'."); } } private  DateRangeAndType(
      LocalDate startDate, LocalDate endDate, ReportDefinitionDateRangeType type); String getStartDateStr(); String getEndDateStr(); String getTypeStr(); LocalDate getStartDate(); LocalDate getEndDate(); ReportDefinitionDateRangeType getType(); DateRange getDateRange(); static DateRangeAndType fromValues(LocalDate startDate, LocalDate endDate,
      ReportDefinitionDateRangeType type); static DateRangeAndType fromString(final String dateRange); }
DateRangeAndType { public static DateRangeAndType fromValues(LocalDate startDate, LocalDate endDate, ReportDefinitionDateRangeType type) { if (startDate != null && endDate != null) { return new DateRangeAndType(startDate, endDate, ReportDefinitionDateRangeType.CUSTOM_DATE); } else if (type != null && type != ReportDefinitionDateRangeType.CUSTOM_DATE) { return parseEnumFormat(type); } else { throw new IllegalArgumentException( "Must provide either: 'startDate' and 'endData', or 'type'."); } } private  DateRangeAndType(
      LocalDate startDate, LocalDate endDate, ReportDefinitionDateRangeType type); String getStartDateStr(); String getEndDateStr(); String getTypeStr(); LocalDate getStartDate(); LocalDate getEndDate(); ReportDefinitionDateRangeType getType(); DateRange getDateRange(); static DateRangeAndType fromValues(LocalDate startDate, LocalDate endDate,
      ReportDefinitionDateRangeType type); static DateRangeAndType fromString(final String dateRange);  }