Class 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 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      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.
      • 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​(java.util.Map<java.lang.String,​java.lang.Object> item,
                              java.sql.PreparedStatement ps)
                       throws java.sql.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<java.util.Map<java.lang.String,​java.lang.Object>>
        Parameters:
        item - the item to obtain the values from
        ps - 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)