org.springframework.batch.item.support
Class AggregateItemReader
java.lang.Object
org.springframework.batch.item.AbstractItemReader
org.springframework.batch.item.support.DelegatingItemReader
org.springframework.batch.item.support.AggregateItemReader
- 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.
- Author:
- Dave Syer
Method Summary |
Object |
read()
Get the next list of records. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
END_RECORD
public static final Object END_RECORD
- Marker for the end of a multi-object record.
BEGIN_RECORD
public static final Object BEGIN_RECORD
- Marker for the beginning of a multi-object record.
AggregateItemReader
public AggregateItemReader()
read
public Object read()
throws Exception
- Get the next list of records.
- Specified by:
read
in interface ItemReader
- Overrides:
read
in class DelegatingItemReader
- Throws:
Exception
- See Also:
ItemReader.read()
Copyright © 2008 SpringSource. All Rights Reserved.