Example usage for org.springframework.batch.item.validator ValidationException ValidationException

List of usage examples for org.springframework.batch.item.validator ValidationException ValidationException

Introduction

In this page you can find the example usage for org.springframework.batch.item.validator ValidationException ValidationException.

Prototype

public ValidationException(String message) 

Source Link

Document

Create a new ValidationException based on a message.

Usage

From source file:org.openmrs.module.bahmniexports.example.domain.trade.internal.TradeProcessor.java

@Override
public Trade process(Trade item) throws Exception {
    if ((failedItem == null && index++ == failure) || (failedItem != null && failedItem.equals(item))) {
        failedItem = item;//from w  w  w .j  a va 2 s .c o m
        throw new ValidationException("Some bad data for " + failedItem);
    }
    return item;
}

From source file:lcn.module.batch.web.guide.service.TradeProcessor.java

public Trade process(Trade item) throws Exception {
    if ((failedItem == null && index++ == failure) || (failedItem != null && failedItem.equals(item))) {
        failedItem = item;/*from   w w w.  ja va  2  s.co  m*/
        throw new ValidationException("Some bad data for " + failedItem);
    }
    return item;
}