org.springframework.batch.core.resource
Class StepExecutionPreparedStatementSetter

java.lang.Object
  extended by org.springframework.batch.core.listener.StepExecutionListenerSupport
      extended by org.springframework.batch.core.resource.StepExecutionPreparedStatementSetter
All Implemented Interfaces:
StepExecutionListener, StepListener, InitializingBean, PreparedStatementSetter

public class StepExecutionPreparedStatementSetter
extends StepExecutionListenerSupport
implements PreparedStatementSetter, InitializingBean

Implementation of the PreparedStatementSetter interface that also implements StepExecutionListener and uses JobParameters to set the parameters on a PreparedStatement.

Author:
Lucas Ward

Constructor Summary
StepExecutionPreparedStatementSetter()
           
 
Method Summary
 void afterPropertiesSet()
           
 void beforeStep(StepExecution stepExecution)
          Initialise the state of the listener with the StepExecution from the current scope.
 void setParameterKeys(List parameterKeys)
          The parameter names that will be pulled from the JobParameters.
 void setValues(PreparedStatement ps)
           
 
Methods inherited from class org.springframework.batch.core.listener.StepExecutionListenerSupport
afterStep, onErrorInStep
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StepExecutionPreparedStatementSetter

public StepExecutionPreparedStatementSetter()
Method Detail

setValues

public void setValues(PreparedStatement ps)
               throws SQLException
Specified by:
setValues in interface PreparedStatementSetter
Throws:
SQLException

beforeStep

public void beforeStep(StepExecution stepExecution)
Description copied from interface: StepExecutionListener
Initialise the state of the listener with the StepExecution from the current scope.

Specified by:
beforeStep in interface StepExecutionListener
Overrides:
beforeStep in class StepExecutionListenerSupport

setParameterKeys

public void setParameterKeys(List parameterKeys)
The parameter names that will be pulled from the JobParameters. It is assumed that their order in the List is the order of the parameters in the PreparedStatement.


afterPropertiesSet

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


Copyright © 2009 SpringSource. All Rights Reserved.