org.springframework.batch.item.database.support
Class ColumnMapItemPreparedStatementSetter

java.lang.Object
  extended by org.springframework.batch.item.database.support.ColumnMapItemPreparedStatementSetter
All Implemented Interfaces:
ItemPreparedStatementSetter

public class ColumnMapItemPreparedStatementSetter
extends Object
implements ItemPreparedStatementSetter

Implementation of the ItemPreparedStatementSetter interface that assumes all keys are contained within a Map with the column name as the key. It assumes nothing about ordering, and assumes that the order the entry set can be iterated over is the same as the PreparedStatement should be set.

Author:
Lucas Ward, Dave Syer
See Also:
ItemPreparedStatementSetter, ColumnMapRowMapper

Constructor Summary
ColumnMapItemPreparedStatementSetter()
           
 
Method Summary
 void setValues(Object item, PreparedStatement ps)
          Set parameter values on the given PreparedStatement as determined from the provided item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColumnMapItemPreparedStatementSetter

public ColumnMapItemPreparedStatementSetter()
Method Detail

setValues

public void setValues(Object item,
                      PreparedStatement ps)
               throws SQLException
Description copied from interface: ItemPreparedStatementSetter
Set parameter values on the given PreparedStatement as determined from the provided item.

Specified by:
setValues in interface ItemPreparedStatementSetter
ps - the PreparedStatement to invoke setter methods on
Throws:
SQLException - if a SQLException is encountered (i.e. there is no need to catch SQLException)


Copyright © 2008 SpringSource. All Rights Reserved.