Spring Integration

org.springframework.integration.jdbc
Class DefaultSqlParameterSourceFactory

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

public class DefaultSqlParameterSourceFactory
extends Object
implements SqlParameterSourceFactory

A default implementation of SqlParameterSourceFactory which creates an SqlParameterSource according to the type of the data passed in.

Since:
2.0
Author:
Jonas Partner, Dave Syer

Constructor Summary
DefaultSqlParameterSourceFactory()
           
 
Method Summary
 SqlParameterSource createParameterSource(Object input)
          Return a new SqlParameterSource.
 void setIdsParameterName(String idsParamName)
          Name of the id list in the output parameters if the input is a List (default "idList").
 void setRowIdName(String rowIdName)
          Name of the id property in the input elements when the input data is List.
 void setStaticParameters(Map<String,Object> staticParameters)
          If the input is a List or a Map, the output is a map parameter source, and in that case some static parameters can be added (default is empty).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSqlParameterSourceFactory

public DefaultSqlParameterSourceFactory()
Method Detail

setRowIdName

public void setRowIdName(String rowIdName)
Name of the id property in the input elements when the input data is List. Defaults to "id". If the input is not a List then this value is ignored.

Parameters:
rowIdName - the name to set

setIdsParameterName

public void setIdsParameterName(String idsParamName)
Name of the id list in the output parameters if the input is a List (default "idList"). If the input is not a List then this value is ignored.

Parameters:
idsParamName - the name to set

setStaticParameters

public void setStaticParameters(Map<String,Object> staticParameters)
If the input is a List or a Map, the output is a map parameter source, and in that case some static parameters can be added (default is empty). If the input is not a List or a Map then this value is ignored.

Parameters:
staticParameters - the static parameters to set

createParameterSource

public SqlParameterSource createParameterSource(Object input)
Description copied from interface: SqlParameterSourceFactory
Return a new SqlParameterSource.

Specified by:
createParameterSource in interface SqlParameterSourceFactory
Parameters:
input - the raw message or query result to be transformed into a SqlParameterSource

Spring Integration

Copyright © 2010. All Rights Reserved.