/** * * Checks whether a given date is not null * * @param validationObject * @param annotate * @return */ private boolean validateNotNull(Object validationObject, Annotation annotate) { if (validationObject == null || validationObject.equals(null)) { throwValidationException(((NotNull) annotate).message()); } return true; }
private void appendNotNullValidator(SourceWriter w, JField field) { NotNull notNullAnnotation = field.getAnnotation(NotNull.class); if (notNullAnnotation != null) { w.println(", new NotNullValidator(\"%s\")", notNullAnnotation.message()); } }
private void appendNotNullValidator(SourceWriter w, JField field) { NotNull notNullAnnotation = field.getAnnotation(NotNull.class); if (notNullAnnotation != null) { w.println(", new NotNullValidator(\"%s\")", notNullAnnotation.message()); } }
if (notNull != null) { if (isDefinedForDefaultValidationGroup(notNull)) { metaProperty.getAnnotations().put(NotNull.class.getName() + VALIDATION_NOTNULL_MESSAGE, notNull.message()); metaProperty.getAnnotations().put(NotNull.class.getName() + VALIDATION_NOTNULL_MESSAGE, notNull.message()); metaProperty.getAnnotations().put(NotNull.class.getName() + VALIDATION_NOTNULL_UI_COMPONENT, true);
notNullAnnotation.message(), new MessageInterpolator.Context() { @Override
annotation.message(),
getValidationMessage(property, a.message(), Validator.ValidationMessage.NOT_NULL))); LOGGER.debug(() -> "BeanPropertyBeanValidationPostProcessor: added validator to property [" + property + "] for constraint [" + NotNull.class.getName() + "]");