Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.jdbc.core.namedparam
Class SqlParameterSourceUtils

    java.lang.Object
      org.springframework.jdbc.core.namedparam.SqlParameterSourceUtils

    public class SqlParameterSourceUtils

extends java.lang.Object

Class that provides helper methods for the use of `SqlParameterSource` with `SimpleJdbc` classes.

Since:
  2.5
Author:
  Thomas Risberg

Constructor Summary
`SqlParameterSourceUtils()`

Method Summary
`static SqlParameterSource[]` | `createBatch(java.util.Map[] valueMaps)` Create an array of MapSqlParameterSource objects populated with data from the values passed in.
`static SqlParameterSource[]` | `createBatch(java.lang.Object[] beans)` Create an array of BeanPropertySqlParameterSource objects populated with data from the values passed in.
`static java.util.Map` | `extractCaseInsensitiveParameterNames(SqlParameterSource parameterSource)` Create a Map of case insensitive parameter names together with the original name.
`static java.lang.Object` | `getTypedValue(SqlParameterSource source, java.lang.String parameterName)` Create a wrapped value if parameter has type information, plain object if not.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SqlParameterSourceUtils

    public SqlParameterSourceUtils()

Method Detail

### createBatch

    public static SqlParameterSource[] createBatch(java.util.Map[] valueMaps)

  Create an array of MapSqlParameterSource objects populated with data from the values passed in. This will define what is included in a batch operation.

  Parameters:
    `valueMaps` - array of Maps containing the values to be used
  Returns:
    an array of SqlParameterSource

### createBatch

    public static SqlParameterSource[] createBatch(java.lang.Object[] beans)

  Create an array of BeanPropertySqlParameterSource objects populated with data from the values passed in. This will define what is included in a batch operation.

  Parameters:
    `beans` - object array of beans containing the values to be used
  Returns:
    an array of SqlParameterSource

### getTypedValue

    public static java.lang.Object getTypedValue(SqlParameterSource source,
                                                 java.lang.String parameterName)

  Create a wrapped value if parameter has type information, plain object if not.

  Parameters:
    `source` - the source of paramer values and type information
    `parameterName` - the name of the parameter
  Returns:
    the value object

### extractCaseInsensitiveParameterNames

    public static java.util.Map extractCaseInsensitiveParameterNames(SqlParameterSource parameterSource)

  Create a Map of case insensitive parameter names together with the original name.

  Parameters:
    `parameterSource` - the source of paramer names
  Returns:
    the Map that can be used for case insensitive matching of parameter names

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD