org.springframework.batch.sample.common
Class StagingItemProcessor<T>
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StagingItemProcessor
public StagingItemProcessor()
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.