Class ColumnMapItemPreparedStatementSetter
- java.lang.Object
- org.springframework.batch.item.database.support.ColumnMapItemPreparedStatementSetter
- All Implemented Interfaces:
ItemPreparedStatementSetter<java.util.Map<java.lang.String,java.lang.Object>>
public class ColumnMapItemPreparedStatementSetter extends java.lang.Object implements ItemPreparedStatementSetter<java.util.Map<java.lang.String,java.lang.Object>>
Implementation of the
ItemPreparedStatementSetterinterface that assumes all keys are contained within aMapwith 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
Constructors Constructor Description ColumnMapItemPreparedStatementSetter()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetValues(java.util.Map<java.lang.String,java.lang.Object> item, java.sql.PreparedStatement ps)Set parameter values on the given PreparedStatement as determined from the provided item.
Method Detail
setValues
public void setValues(java.util.Map<java.lang.String,java.lang.Object> item, java.sql.PreparedStatement ps) throws java.sql.SQLExceptionDescription copied from interface:ItemPreparedStatementSetterSet parameter values on the given PreparedStatement as determined from the provided item.- Specified by:
setValuesin interfaceItemPreparedStatementSetter<java.util.Map<java.lang.String,java.lang.Object>>- Parameters:
item- the item to obtain the values fromps- the PreparedStatement to invoke setter methods on- Throws:
java.sql.SQLException- if a SQLException is encountered (i.e. there is no need to catch SQLException)