Class ListItemReader

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

public class ListItemReader
extends AbstractItemReader

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

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.AbstractItemReader
mark, reset
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public ListItemReader(List list)
Method Detail


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 © 2008 SpringSource. All Rights Reserved.