org.springframework.batch.item.support
Class ListItemReader

java.lang.Object
  extended by org.springframework.batch.item.support.AbstractItemReader
      extended by org.springframework.batch.item.support.ListItemReader
All Implemented Interfaces:
ItemReader

public class ListItemReader
extends AbstractItemReader

An ItemReader that pulls data from a list. Useful for testing.

Author:
Dave Syer

Constructor Summary
ListItemReader(List list)
           
 
Method Summary
 Object read()
          Reads a piece of input data and advance to the next one.
 
Methods inherited from class org.springframework.batch.item.support.AbstractItemReader
mark, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListItemReader

public ListItemReader(List list)
Method Detail

read

public Object read()
Description copied from interface: ItemReader
Reads a piece of input data and advance to the next one. Implementations must return null at the end of the input data set. In a transactional setting, caller might get the same item twice from successive calls (or otherwise), if the first call was in a transaction that rolled back.



Copyright © 2009 SpringSource. All Rights Reserved.