Class AggregateItemReader

  extended by org.springframework.batch.item.AbstractItemReader
      extended by
          extended by
All Implemented Interfaces:
ItemReader, InitializingBean

public class AggregateItemReader
extends DelegatingItemReader

An 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. The ItemReader should mark the beginning and end of records with the constant values in FieldSetMapper (BEGIN_RECORD and END_RECORD).
This class is thread safe (it can be used concurrently by multiple threads) as long as the ItemReader is also thread safe.

Dave Syer

Field Summary
static Object BEGIN_RECORD
          Marker for the beginning of a multi-object record.
static Object END_RECORD
          Marker for the end of a multi-object record.
Constructor Summary
Method Summary
 Object read()
          Get the next list of records.
Methods inherited from class
afterPropertiesSet, mark, reset, setItemReader
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


public static final Object END_RECORD
Marker for the end of a multi-object record.


public static final Object BEGIN_RECORD
Marker for the beginning of a multi-object record.

Constructor Detail


public AggregateItemReader()
Method Detail


public Object read()
            throws Exception
Get the next list of records.

Specified by:
read in interface ItemReader
read in class DelegatingItemReader
See Also:

Copyright © 2008 SpringSource. All Rights Reserved.