org.springframework.batch.sample.common
Class StagingItemProcessor<T>

java.lang.Object
  extended by org.springframework.batch.sample.common.StagingItemProcessor<T>
Type Parameters:
T - item type
All Implemented Interfaces:
ItemProcessor<ProcessIndicatorItemWrapper<T>,T>, InitializingBean

public class StagingItemProcessor<T>
extends Object
implements ItemProcessor<ProcessIndicatorItemWrapper<T>,T>, InitializingBean

Marks the input row as 'processed'. (This change will rollback if there is problem later)

Author:
Robert Kasanicky
See Also:
StagingItemReader, StagingItemWriter, ProcessIndicatorItemWrapper

Constructor Summary
StagingItemProcessor()
           
 
Method Summary
 void afterPropertiesSet()
           
 T process(ProcessIndicatorItemWrapper<T> wrapper)
          Use the technical identifier to mark the input row as processed and return unwrapped item.
 void setDataSource(DataSource dataSource)
           
 void setJdbcTemplate(SimpleJdbcOperations jdbcTemplate)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StagingItemProcessor

public StagingItemProcessor()
Method Detail

setJdbcTemplate

public void setJdbcTemplate(SimpleJdbcOperations jdbcTemplate)

setDataSource

public void setDataSource(DataSource dataSource)

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
Exception

process

public T process(ProcessIndicatorItemWrapper<T> wrapper)
          throws Exception
Use the technical identifier to mark the input row as processed and return unwrapped item.

Specified by:
process in interface ItemProcessor<ProcessIndicatorItemWrapper<T>,T>
Parameters:
wrapper - to be processed
Returns:
potentially modified or new item for continued processing, null if processing of the provided item should not continue.
Throws:
Exception


Copyright © 2009 SpringSource. All Rights Reserved.