@Test public void testAddDays() { AddDays action = new AddDays(); action.setDays(2); assertNull(DateFieldActions.addDays(action, null)); ZonedDateTime origDate = ZonedDateTime.now(); ZonedDateTime laterDate = origDate.plusDays(2); assertEquals(laterDate, DateFieldActions.addDays(action, origDate)); }
@AtlasActionProcessor(sourceType = FieldType.ANY_DATE) public static ZonedDateTime addDays(AddDays addDays, ZonedDateTime input) { if (addDays == null) { throw new IllegalArgumentException("AddDays action must be specified"); } if (input == null) { return null; } return input.plusDays(addDays.getDays() == null ? 0L : addDays.getDays()); }
DateFieldActions implements AtlasFieldAction { @AtlasActionProcessor(sourceType = FieldType.ANY_DATE) public static ZonedDateTime addDays(AddDays addDays, ZonedDateTime input) { if (addDays == null) { throw new IllegalArgumentException("AddDays action must be specified"); } if (input == null) { return null; } return input.plusDays(addDays.getDays() == null ? 0L : addDays.getDays()); } }
DateFieldActions implements AtlasFieldAction { @AtlasActionProcessor(sourceType = FieldType.ANY_DATE) public static ZonedDateTime addDays(AddDays addDays, ZonedDateTime input) { if (addDays == null) { throw new IllegalArgumentException("AddDays action must be specified"); } if (input == null) { return null; } return input.plusDays(addDays.getDays() == null ? 0L : addDays.getDays()); }  }
DateFieldActions implements AtlasFieldAction { @AtlasActionProcessor(sourceType = FieldType.ANY_DATE) public static ZonedDateTime addDays(AddDays addDays, ZonedDateTime input) { if (addDays == null) { throw new IllegalArgumentException("AddDays action must be specified"); } if (input == null) { return null; } return input.plusDays(addDays.getDays() == null ? 0L : addDays.getDays()); }  @AtlasActionProcessor(sourceType = FieldType.ANY_DATE) static ZonedDateTime addDays(AddDays addDays, ZonedDateTime input); @AtlasActionProcessor(sourceType = FieldType.ANY_DATE) static ZonedDateTime addSeconds(AddSeconds addSeconds, ZonedDateTime input); @AtlasActionProcessor static ZonedDateTime currentDate(CurrentDate action); @AtlasActionProcessor static ZonedDateTime currentDateTime(CurrentDateTime action); @AtlasActionProcessor static ZonedDateTime currentTime(CurrentTime action); @AtlasActionProcessor(sourceType = FieldType.ANY_DATE) static Integer dayOfMonth(DayOfMonth action, ZonedDateTime input); @AtlasActionProcessor(sourceType = FieldType.ANY_DATE) static Integer dayOfWeek(DayOfWeek action, ZonedDateTime input); @AtlasActionProcessor(sourceType = FieldType.ANY_DATE) static Integer dayOfYear(DayOfYear action, ZonedDateTime input); }
DateFieldActions implements AtlasFieldAction { @AtlasActionProcessor(sourceType = FieldType.ANY_DATE) public static ZonedDateTime addDays(AddDays addDays, ZonedDateTime input) { if (addDays == null) { throw new IllegalArgumentException("AddDays action must be specified"); } if (input == null) { return null; } return input.plusDays(addDays.getDays() == null ? 0L : addDays.getDays()); }  @AtlasActionProcessor(sourceType = FieldType.ANY_DATE) static ZonedDateTime addDays(AddDays addDays, ZonedDateTime input); @AtlasActionProcessor(sourceType = FieldType.ANY_DATE) static ZonedDateTime addSeconds(AddSeconds addSeconds, ZonedDateTime input); @AtlasActionProcessor static ZonedDateTime currentDate(CurrentDate action); @AtlasActionProcessor static ZonedDateTime currentDateTime(CurrentDateTime action); @AtlasActionProcessor static ZonedDateTime currentTime(CurrentTime action); @AtlasActionProcessor(sourceType = FieldType.ANY_DATE) static Integer dayOfMonth(DayOfMonth action, ZonedDateTime input); @AtlasActionProcessor(sourceType = FieldType.ANY_DATE) static Integer dayOfWeek(DayOfWeek action, ZonedDateTime input); @AtlasActionProcessor(sourceType = FieldType.ANY_DATE) static Integer dayOfYear(DayOfYear action, ZonedDateTime input);  }