org.springframework.integration.jdbc
Class DefaultSqlParameterSourceFactory

java.lang.Object
  extended by org.springframework.integration.jdbc.DefaultSqlParameterSourceFactory
All Implemented Interfaces:
SqlParameterSourceFactory

public class DefaultSqlParameterSourceFactory
extends java.lang.Object
implements SqlParameterSourceFactory

A default implementation of SqlParameterSourceFactory which creates an SqlParameterSource according to the result of the data passed in. Where the data is a List, a list of ids is generated by looking for a map entry or bean property named by default 'id'. The resulting SqlParameterSource contains this list under a default key of 'idList'. Where the data is a Map, this is wrapped in an instance of MapSqlParameterSource. Otherwise the result is wrapped in an instance of BeanPropertySqlParameterSource.

Since:
2.0
Author:
Jonas Partner

Constructor Summary
DefaultSqlParameterSourceFactory()
           
DefaultSqlParameterSourceFactory(java.util.Map<java.lang.String,java.lang.Object> staticParameters)
           
 
Method Summary
 org.springframework.jdbc.core.namedparam.SqlParameterSource createParameterSource(java.lang.Object resultOfSelect)
          Return a new SqlParameterSource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSqlParameterSourceFactory

public DefaultSqlParameterSourceFactory()

DefaultSqlParameterSourceFactory

public DefaultSqlParameterSourceFactory(java.util.Map<java.lang.String,java.lang.Object> staticParameters)
Method Detail

createParameterSource

public org.springframework.jdbc.core.namedparam.SqlParameterSource createParameterSource(java.lang.Object resultOfSelect)
Description copied from interface: SqlParameterSourceFactory
Return a new SqlParameterSource.

Specified by:
createParameterSource in interface SqlParameterSourceFactory