org.springframework.batch.item.validator
Class ValidatingItemReader
java.lang.Object
org.springframework.batch.item.support.AbstractItemReader
org.springframework.batch.item.support.DelegatingItemReader
org.springframework.batch.item.validator.ValidatingItemReader
- All Implemented Interfaces:
- ItemReader, InitializingBean
public class ValidatingItemReader
- extends DelegatingItemReader
Simple extension of DelegatingItemReader
that provides for
validation before returning input.
- Author:
- Lucas Ward
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ValidatingItemReader
public ValidatingItemReader()
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Specified by:
afterPropertiesSet
in interface InitializingBean
- Overrides:
afterPropertiesSet
in class DelegatingItemReader
- Throws:
Exception
read
public Object read()
throws Exception
- Description copied from class:
DelegatingItemReader
- Get the next object from the input source.
- Specified by:
read
in interface ItemReader
- Overrides:
read
in class DelegatingItemReader
- Throws:
Exception
- if an underlying resource is unavailable.- See Also:
ItemReader.read()
setValidator
public void setValidator(Validator validator)
- Set the validator used to validate each item.
- Parameters:
validator
-
Copyright © 2009 SpringSource. All Rights Reserved.