站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.1.0 API 文档英文版

CallableStatementCreatorFactory (Spring Framework API 2.1) - Spring Framework 2.1.0 API 文档英文版


The Spring Framework

org.springframework.jdbc.core
Class CallableStatementCreatorFactory

java.lang.Object
  extended by org.springframework.jdbc.core.CallableStatementCreatorFactory

public class CallableStatementCreatorFactory
extends Object

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

Author:
Rod Johnson, Thomas Risberg, Juergen Hoeller

Constructor Summary
CallableStatementCreatorFactory(String callString)
          Create a new factory.
CallableStatementCreatorFactory(String callString, List declaredParameters)
          Create a new factory with sql and the given parameters.
 
Method Summary
 void addParameter(SqlParameter param)
          Add a new declared parameter.
 CallableStatementCreator newCallableStatementCreator(Map inParams)
          Return a new CallableStatementCreator instance given this parameters.
 CallableStatementCreator newCallableStatementCreator(ParameterMapper inParamMapper)
          Return a new CallableStatementCreator instance given this parameter mapper.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CallableStatementCreatorFactory

public CallableStatementCreatorFactory(String callString)
Create a new factory. Will need to add parameters via the addParameter() method or have no parameters.


CallableStatementCreatorFactory

public CallableStatementCreatorFactory(String callString,
                                       List declaredParameters)
Create a new factory with sql and the given parameters.

Parameters:
callString - the SQL call string
declaredParameters - list of SqlParameter objects
Method Detail

addParameter

public void addParameter(SqlParameter param)
Add a new declared parameter. Order of parameter addition is significant.


setResultSetType

public void setResultSetType(int resultSetType)
Set whether to use prepared statements that return a specific type of ResultSet.

Parameters:
resultSetType - the ResultSet type
See Also:
ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.TYPE_SCROLL_SENSITIVE

setUpdatableResults

public void setUpdatableResults(boolean updatableResults)
Set whether to use prepared statements capable of returning updatable ResultSets.


setNativeJdbcExtractor

public void setNativeJdbcExtractor(NativeJdbcExtractor nativeJdbcExtractor)
Specify the NativeJdbcExtractor to use for unwrapping CallableStatements, if any.


newCallableStatementCreator

public CallableStatementCreator newCallableStatementCreator(Map inParams)
Return a new CallableStatementCreator instance given this parameters.

Parameters:
inParams - List of parameters. May be null.

newCallableStatementCreator

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. May not be null.

The Spring Framework

Copyright © 2002-2007 The Spring Framework.