Package org.springframework.batch.item.database.support

# Class ColumnMapItemPreparedStatementSetter

java.lang.Object
org.springframework.batch.item.database.support.ColumnMapItemPreparedStatementSetter

All Implemented Interfaces:
  `ItemPreparedStatementSetter<Map<String,Object>>`

public class ColumnMapItemPreparedStatementSetter extends Object implements ItemPreparedStatementSetter<Map<String,Object>>

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

  Constructors
  Constructor
  Description
  `ColumnMapItemPreparedStatementSetter()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `setValues(Map<String,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 Details

  - ### ColumnMapItemPreparedStatementSetter

    public ColumnMapItemPreparedStatementSetter()

- ## Method Details

  - ### setValues

    public void setValues(Map<String,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<Map<String,Object>>`
    Parameters:
      `item` - the item to obtain the values from
      `ps` - the PreparedStatement to invoke setter methods on
    Throws:
      `SQLException` - if a SQLException is encountered (i.e. there is no need to catch SQLException)