private BigDecimal value10 = new BigDecimal( "1.0" ); @AssertFalse private boolean value11;
/** * @param validationObject * @param annotate * @return */ private boolean validateFalse(Object validationObject, Annotation annotate) { if (checkNullObject(validationObject)) { return true; } if (checkvalidBooleanTypes(validationObject.getClass()) && (Boolean) validationObject) { throwValidationException(((AssertFalse) annotate).message()); } return true; }
@AssertFalse public boolean isMutuallyExclusive() { return this.date != null && this.cron != null && this.fixedDelay != 1; } }
private void appendFalseValidator(SourceWriter w, JField field) { AssertFalse falseAnnotation = field.getAnnotation(AssertFalse.class); if (falseAnnotation != null) { w.println(", new AssertFalseValidator(\"%s\")", falseAnnotation.message()); } }
private static class AssertFalseDummyEntity { @AssertFalse private boolean primitiveBoolean; @AssertFalse private Boolean objectBoolean; public void setPrimitiveBoolean(boolean primitiveBoolean) { this.primitiveBoolean = primitiveBoolean; } public void setObjectBoolean(Boolean objectBoolean) { this.objectBoolean = objectBoolean; } }
private void appendFalseValidator(SourceWriter w, JField field) { AssertFalse falseAnnotation = field.getAnnotation(AssertFalse.class); if (falseAnnotation != null) { w.println(", new AssertFalseValidator(\"%s\")", falseAnnotation.message()); } }
@AssertFalse public boolean isMutuallyExclusive() { return this.date != null && this.cron != null && this.fixedDelay != 1; } }
@AssertFalse public boolean isMutuallyExclusive() { return this.date != null && this.cron != null && this.fixedDelay != 1; } }
@AssertFalse public boolean isMutuallyExclusive() { return this.date != null && this.cron != null && this.fixedDelay != 1; } }
@AssertFalse public boolean isIntern() { return false; }
@AssertFalse boolean isMutuallyExclusive(); }
@AssertFalse boolean isMutuallyExclusive(); }
@AssertFalse(message="The person type must be human") private boolean isHuman;
class AssertFalseDummyEntity { @AssertFalse boolean primitiveBoolean; @AssertFalse Boolean objectBoolean; public boolean isPrimitiveBoolean() { return primitiveBoolean; } public void setPrimitiveBoolean(boolean primitiveBoolean) { this.primitiveBoolean = primitiveBoolean; } public Boolean isObjectBoolean() { return objectBoolean; } public void setObjectBoolean(Boolean objectBoolean) { this.objectBoolean = objectBoolean; } }
@AssertFalse(message = "invalid 'dateFormat' pattern specified") public boolean isInvalidDateFormat() { try { new SimpleDateFormat(dateFormat); return false; } catch (IllegalArgumentException e) { return true; } }
@AssertFalse(message = "both 'username' and 'password' are required or neither one") private boolean isInvalid() { return StringUtils.hasText(this.username) ^ StringUtils.hasText(this.password); }
@AssertFalse(message = "both 'username' and 'password' are required or neither one") private boolean isInvalid() { return StringUtils.hasText(this.username) ^ StringUtils.hasText(this.password); }
@AssertFalse public boolean isMaxBackoffLessThanMinBackoff() { return maxBackoff.compareTo(minBackoff) < 0; } }
@AssertFalse public boolean isMaxBackoffLessThanMinBackoff() { return maxBackoff.compareTo(minBackoff) < 0; } }
private static class Constrained { @AssertFalse private boolean assertFalse;