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>, org.springframework.beans.factory.InitializingBean

      public class StagingItemProcessor<T>
      extends java.lang.Object
      implements ItemProcessor<ProcessIndicatorItemWrapper<T>,T>, org.springframework.beans.factory.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

    Constructors
    Constructor and Description
    `StagingItemProcessor()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `afterPropertiesSet()`
    `T` | `process(ProcessIndicatorItemWrapper<T> wrapper)` Use the technical identifier to mark the input row as processed and return unwrapped item.
    `void` | `setDataSource(javax.sql.DataSource dataSource)`
    `void` | `setJdbcTemplate(org.springframework.jdbc.core.JdbcOperations 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(org.springframework.jdbc.core.JdbcOperations jdbcTemplate)

    - #### setDataSource

          public void setDataSource(javax.sql.DataSource dataSource)

    - #### afterPropertiesSet

          public void afterPropertiesSet()
                                  throws java.lang.Exception

      Specified by:
        `afterPropertiesSet` in interface `org.springframework.beans.factory.InitializingBean`
      Throws:
        `java.lang.Exception`

    - #### process

          public T process(ProcessIndicatorItemWrapper<T> wrapper)
                    throws java.lang.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:
        `java.lang.Exception`