public abstract class

AbstractSqlParameterSource

extends Object
implements SqlParameterSource
java.lang.Object
   ↳ org.springframework.jdbc.core.namedparam.AbstractSqlParameterSource
Known Direct Subclasses

Class Overview

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

Summary

[Expand]
Inherited Constants
From interface org.springframework.jdbc.core.namedparam.SqlParameterSource
Public Constructors
AbstractSqlParameterSource()
Public Methods
int getSqlType(String paramName)
Return the SQL type for the given parameter, if registered.
String getTypeName(String paramName)
Return the type name for the given parameter, if registered.
void registerSqlType(String paramName, int sqlType)
Register a SQL type for the given parameter.
void registerTypeName(String paramName, String typeName)
Register a SQL type for the given parameter.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.jdbc.core.namedparam.SqlParameterSource

Public Constructors

public AbstractSqlParameterSource ()

Public Methods

public int getSqlType (String paramName)

Return the SQL type for the given parameter, if registered.

Parameters
paramName the name of the parameter
Returns
  • the SQL type of the parameter, or TYPE_UNKNOWN if not registered

public String getTypeName (String paramName)

Return the type name for the given parameter, if registered.

Parameters
paramName the name of the parameter
Returns
  • the type name of the parameter, or null if not registered

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

public void registerTypeName (String paramName, String typeName)

Register a SQL type for the given parameter.

Parameters
paramName the name of the parameter
typeName the type name of the parameter