@Test public void testValidDayUpperRange() { final Configuration input = this.createConfigurationInstance(30, LongTermIntervalType.DAYS); assertThat(this.validator.isValid(input, null)).isTrue(); }
@Override public boolean isValid(final Configuration value, final ConstraintValidatorContext context) { if (value == null) { return true; } if (value.getLongTermHistoryInterval() == null && value.getLongTermHistoryIntervalType() == null) { return true; } final Integer interval = value.getLongTermHistoryInterval(); final LongTermIntervalType type = value.getLongTermHistoryIntervalType(); return this.checkRanges(interval, type); }
LongTermIntervalAndLongTermIntervalTypeValidator implements ConstraintValidator<LongTermIntervalAndLongTermIntervalType, Configuration> { @Override public boolean isValid(final Configuration value, final ConstraintValidatorContext context) { if (value == null) { return true; } if (value.getLongTermHistoryInterval() == null && value.getLongTermHistoryIntervalType() == null) { return true; } final Integer interval = value.getLongTermHistoryInterval(); final LongTermIntervalType type = value.getLongTermHistoryIntervalType(); return this.checkRanges(interval, type); } }
LongTermIntervalAndLongTermIntervalTypeValidator implements ConstraintValidator<LongTermIntervalAndLongTermIntervalType, Configuration> { @Override public boolean isValid(final Configuration value, final ConstraintValidatorContext context) { if (value == null) { return true; } if (value.getLongTermHistoryInterval() == null && value.getLongTermHistoryIntervalType() == null) { return true; } final Integer interval = value.getLongTermHistoryInterval(); final LongTermIntervalType type = value.getLongTermHistoryIntervalType(); return this.checkRanges(interval, type); }  }
LongTermIntervalAndLongTermIntervalTypeValidator implements ConstraintValidator<LongTermIntervalAndLongTermIntervalType, Configuration> { @Override public boolean isValid(final Configuration value, final ConstraintValidatorContext context) { if (value == null) { return true; } if (value.getLongTermHistoryInterval() == null && value.getLongTermHistoryIntervalType() == null) { return true; } final Integer interval = value.getLongTermHistoryInterval(); final LongTermIntervalType type = value.getLongTermHistoryIntervalType(); return this.checkRanges(interval, type); }  @Override void initialize(final LongTermIntervalAndLongTermIntervalType constraintAnnotation); @Override boolean isValid(final Configuration value, final ConstraintValidatorContext context); }
LongTermIntervalAndLongTermIntervalTypeValidator implements ConstraintValidator<LongTermIntervalAndLongTermIntervalType, Configuration> { @Override public boolean isValid(final Configuration value, final ConstraintValidatorContext context) { if (value == null) { return true; } if (value.getLongTermHistoryInterval() == null && value.getLongTermHistoryIntervalType() == null) { return true; } final Integer interval = value.getLongTermHistoryInterval(); final LongTermIntervalType type = value.getLongTermHistoryIntervalType(); return this.checkRanges(interval, type); }  @Override void initialize(final LongTermIntervalAndLongTermIntervalType constraintAnnotation); @Override boolean isValid(final Configuration value, final ConstraintValidatorContext context);  }