public class

CallableStatementCreatorFactory

extends Object
java.lang.Object
   ↳ org.springframework.jdbc.core.CallableStatementCreatorFactory

Class Overview

Helper class that efficiently creates multiple CallableStatementCreator objects with different parameters based on a SQL statement and a single set of parameter declarations.

Summary

Public Constructors
CallableStatementCreatorFactory(String callString)
Create a new factory.
CallableStatementCreatorFactory(String callString, List<SqlParameter> declaredParameters)
Create a new factory with the given SQL and the given parameters.
Public Methods
void addParameter(SqlParameter param)
Add a new declared parameter.
CallableStatementCreator newCallableStatementCreator(ParameterMapper inParamMapper)
Return a new CallableStatementCreator instance given this parameter mapper.
CallableStatementCreator newCallableStatementCreator(Map<String, ?> params)
Return a new CallableStatementCreator instance given this parameters.
void setNativeJdbcExtractor(NativeJdbcExtractor nativeJdbcExtractor)
Specify the NativeJdbcExtractor to use for unwrapping CallableStatements, if any.
void setResultSetType(int resultSetType)
Set whether to use prepared statements that return a specific type of ResultSet.
void setUpdatableResults(boolean updatableResults)
Set whether to use prepared statements capable of returning updatable ResultSets.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public CallableStatementCreatorFactory (String callString)

Create a new factory. Will need to add parameters via the addParameter(SqlParameter) method or have no parameters.

public CallableStatementCreatorFactory (String callString, List<SqlParameter> declaredParameters)

Create a new factory with the given SQL and the given parameters.

Parameters
callString the SQL call string
declaredParameters list of SqlParameter objects

Public Methods

public void addParameter (SqlParameter param)

Add a new declared parameter.

Order of parameter addition is significant.

Parameters
param the parameter to add to the list of declared parameters

public CallableStatementCreator newCallableStatementCreator (ParameterMapper inParamMapper)

Return a new CallableStatementCreator instance given this parameter mapper.

Parameters
inParamMapper ParameterMapper implementation that will return a Map of parameters

public CallableStatementCreator newCallableStatementCreator (Map<String, ?> params)

Return a new CallableStatementCreator instance given this parameters.

Parameters
params list of parameters (may be null)

public void setNativeJdbcExtractor (NativeJdbcExtractor nativeJdbcExtractor)

Specify the NativeJdbcExtractor to use for unwrapping CallableStatements, if any.

public void setResultSetType (int resultSetType)

Set whether to use prepared statements that return a specific type of ResultSet. specific type of ResultSet.

Parameters
resultSetType the ResultSet type

public void setUpdatableResults (boolean updatableResults)

Set whether to use prepared statements capable of returning updatable ResultSets.