本文整理汇总了Java中org.springframework.batch.item.validator.ValidatingItemProcessor类的典型用法代码示例。如果您正苦于以下问题:Java ValidatingItemProcessor类的具体用法?Java ValidatingItemProcessor怎么用?Java ValidatingItemProcessor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ValidatingItemProcessor类属于org.springframework.batch.item.validator包,在下文中一共展示了ValidatingItemProcessor类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUp
import org.springframework.batch.item.validator.ValidatingItemProcessor; //导入依赖的package包/类
@Before
@SuppressWarnings({ "rawtypes", "unchecked" })
public void setUp() {
List delegates = new ArrayList();
ValidatingItemProcessor processor1 = new ValidatingItemProcessor();
processor1.setFilter(true);
processor1.setValidator(new PriceMandatoryValidator());
delegates.add(processor1);
ValidatingItemProcessor processor2 = new ValidatingItemProcessor();
processor2.setFilter(true);
processor2.setValidator(new PositivePriceValidator());
delegates.add(processor2);
processor = new CompositeItemProcessor<Product, Product>();
processor.setDelegates(delegates);
}