Appendix A. List of ItemReaders and ItemWriters

Item Readers

Table A.1. Available Item Readers
Item ReaderDescription
AbstractItemCountingItemStreamItemReaderAbstract base class that provides basic restart capabilities by counting the number of items returned from an ItemReader.
AggregateItemReaderAn 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
AmqpItemReaderGiven a Spring AmqpTemplate it provides synchronous receive methods. The receiveAndConvert() method lets you receive POJO objects.
FlatFileItemReaderReads from a flat file. Includes ItemStream and Skippable functionality. See section on Read from a File
HibernateCursorItemReaderReads from a cursor based on an HQL query. See section on Reading from a Database
HibernatePagingItemReaderReads from a paginated HQL query
IbatisPagingItemReaderReads via iBATIS based on a query. Pages through the rows so that large datasets can be read without running out of memory. See HOWTO - Read from a Database. This ItemReader is now deprecated as of Spring Batch 3.0.
ItemReaderAdapterAdapts any class to the ItemReader interface.
JdbcCursorItemReaderReads from a database cursor via JDBC. See HOWTO - Read from a Database
JdbcPagingItemReaderGiven a SQL statement, pages through the rows, such that large datasets can be read without running out of memory
JmsItemReaderGiven a Spring JmsOperations object and a JMS Destination or destination name to send errors, provides items received through the injected JmsOperations receive() method
JpaPagingItemReaderGiven a JPQL statement, pages through the rows, such that large datasets can be read without running out of memory
ListItemReaderProvides the items from a list, one at a time
MongoItemReaderGiven a MongoOperations object and JSON based MongoDB query, provides items received from the MongoOperations find method
Neo4jItemReaderGiven a Neo4jOperations object and the components of a Cyhper query, items are returned as the result of the Neo4jOperations.query method
RepositoryItemReaderGiven a Spring Data PagingAndSortingRepository object, a Sort and the name of method to execute, returns items provided by the Spring Data repository implementation
StoredProcedureItemReaderReads from a database cursor resulting from the execution of a database stored procedure. See HOWTO - Read from a Database
StaxEventItemReaderReads via StAX. See HOWTO - Read from a File