Examples of ValidationErrors


Examples of org.springframework.data.rest.core.ValidationErrors

      return null;
    }

    Class<?> domainType = o.getClass();
    Repositories repositories = repositoriesFactory.getObject();
    Errors errors = new ValidationErrors(domainType.getSimpleName(), o, repositories.getPersistentEntity(domainType));

    for (Validator v : getValidatorsForEvent(event)) {
      if (v.supports(domainType)) {
        LOGGER.debug("{}: {} with {}", event, o, v);
        ValidationUtils.invokeValidator(v, o, errors);
      }
    }

    if (errors.getErrorCount() > 0) {
      throw new RepositoryConstraintViolationException(errors);
    }

    return errors;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.