Package org.springframework.batch.item.validator

Examples of org.springframework.batch.item.validator.ValidationException


  public void validate(Entry value) throws ValidationException {
   
    Set<ConstraintViolation<Entry>> violations = new HashSet<ConstraintViolation<Entry>>();
    violations = validator.validate(value);
    if(!violations.isEmpty()) {
      throw new ValidationException("Validation failed for " + value + ": " +
          violationsToString(violations));
    }
  }
View Full Code Here


  @Override
  public Trade process(Trade item) throws Exception {
    if ((failedItem == null && index++ == failure) || (failedItem != null && failedItem.equals(item))) {
      failedItem = item;
      throw new ValidationException("Some bad data for " + failedItem);
    }
    return item;
  }
View Full Code Here

TOP

Related Classes of org.springframework.batch.item.validator.ValidationException

Copyright © 2018 www.massapicom. 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.