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

AbstractSqlParameterSource (Spring Framework API 2.0) - Spring Framework 2.0.5 API 文档英文版

The Spring Framework

org.springframework.jdbc.core.namedparam
Class AbstractSqlParameterSource

java.lang.Object
  extended by org.springframework.jdbc.core.namedparam.AbstractSqlParameterSource
All Implemented Interfaces:
SqlParameterSource
Direct Known Subclasses:
BeanPropertySqlParameterSource, MapSqlParameterSource

public abstract class AbstractSqlParameterSource
extends Object
implements SqlParameterSource

Abstract base class for SqlParameterSource implementations. Provides registration of SQL types per parameter.

Since:
2.0
Author:
Juergen Hoeller

Field Summary
 
Fields inherited from interface org.springframework.jdbc.core.namedparam.SqlParameterSource
TYPE_UNKNOWN
 
Constructor Summary
AbstractSqlParameterSource()
           
 
Method Summary
 int getSqlType(String paramName)
          Return the SQL type for the given parameter, if registered.
 void registerSqlType(String paramName, int sqlType)
          Register a SQL type for the given parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.jdbc.core.namedparam.SqlParameterSource
getValue, hasValue
 

Constructor Detail

AbstractSqlParameterSource

public AbstractSqlParameterSource()
Method Detail

registerSqlType

public void registerSqlType(String paramName,
                            int sqlType)
Register a SQL type for the given parameter.

Parameters:
paramName - the name of the parameter
sqlType - the SQL type of the parameter

getSqlType

public int getSqlType(String paramName)
Return the SQL type for the given parameter, if registered.

Specified by:
getSqlType in interface SqlParameterSource
Parameters:
paramName - the name of the parameter
Returns:
the SQL type of the parameter, or TYPE_UNKNOWN if not registered
See Also:
SqlParameterSource.TYPE_UNKNOWN

The Spring Framework

Copyright © 2002-2007 The Spring Framework.