Appendix A. List of ItemReaders

A.1. Item Readers

Table A.1. Available Item Readers

Item ReaderType of Item ProvidedDescription
ListItemReaderjava.lang.ObjectProvides the items from a list, one at a time
ValidatingItemReaderjava.lang.ObjectA simple extension of DelegatingItemReader that provides for validation before returning input.
AggregateItemReaderjava.util.CollectionAn ItemReader that delivers a list as its item, storing up objects from the injected ItemReader until they are ready to be packed out as a collection. This ItemReader should mark the beginning and end of records with the constant values in FieldSetMapper AggregateItemReader#BEGIN_RECORD and AggregateItemReader#END_RECORD
DelegatingItemReaderjava.lang.ObjectExtends AbstractMethodInvokingDelegator, which enables dynamically calling of a custom method of the injected object. Provides a convenient API for dynamic method invocation shielding subclasses from the low-level details and exception handling.
FlatFileItemReaderjava.lang.StringReads from a flat file, includes ItemStream and Skippable functionality. See section on Read from a File
StaxEventItemReaderjava.lang.ObjectReads via StAX. See HOWTO - Read from a File
JdbcCursorItemReaderjava.lang.ObjectReads from a database cursor via JDBC. See HOWTO - Read from a Database
DrivingQueryItemReaderjava.lang.ObjectBase class for operations that read from a database based on a single driving query. Configured by injecting a KeyGenerator object. See HOWTO - Read from a Database
HibernateCursorItemReaderjava.lang.ObjectReads from a cursor based on an HQL query. See section on Reading from a Database
IbatisDrivingQueryItemReaderjava.lang.ObjectReads via iBATIS based on a driving query. See HOWTO - Read from a Database
JmsItemReaderjavax.jms.MessageGiven a Spring JmsOperations object and a JMS Destination or destination name to send errors, provides items received through the injected JmsOperations receive() method

A.2. Item Writers

Table A.2. Available Item Writers

Item WriterType of Item WrittenDescription
CompositeItemWriterjava.lang.ObjectPasses an item to the process method of each in an injected List of ItemWriter objects
DelegatingItemWriterjava.lang.ObjectWraps ItemWriter and is BeanAware allowing it to respond to Spring Bean events like afterPropertiesSet().
PropertyExtractingDelegatingItemWriterjava.lang.ObjectExtends AbstractMethodInvokingDelegator creating arguments on the fly. Arguments are created by retrieving the values from the fields in the item to be processed (via a SpringBeanWrapper) based on an injected array of field name
ItemTransformerItemWriterjava.lang.ObjectExtends ItemWriterItemWriter by defining its doProcess method to call an injected ItemTransformer
FlatFileItemWriterjava.lang.ObjectAttempts to convert the item to a String, Collection or array using an injected Coverter and then recurses. See [HOWTO - Write to a File]
HibernateAwareItemWriterjava.lang.ObjectThis item writer is hibernate session aware and handles some transaction-related work that a non-"hibernate aware" item writer would not need to know about and then delegates to another item writer to do the actual writing. See [HOWTO - Write to a Database]
StaxEventWriterItemWriterjava.lang.ObjectUses an ObjectToXmlSerializer implementation to convert each item to XML and then writes it to an XML file using StAX. See [HOWTO - Write to a File]