org.springframework.jdbc.core
Class SqlParameter

Direct Known Subclasses:
SqlOutParameter, SqlReturnResultSet

public class SqlParameter

Object to represent a SQL parameter definition. Parameters may be anonymous, in which case name is null. However all parameters must define a SQL type constant from java.sql.Types.

Author:
Rod Johnson

Inner Class Summary
 (package private) classSqlParameter.ResultReaderStoredProcImpl
          Implementation of ResultReader that calls the supplied RowMapper class's mapRow() method for each row.

Constructor Summary
SqlParameter(int type)
          Add a new anonymous parameter
SqlParameter(int type, String typeName)
           
SqlParameter(String name, int type)
           
SqlParameter(String name, int type, String typeName)
           

Method Summary
 StringgetName()
           
 intgetSqlType()
           
 StringgetTypeName()
           
 static ListsqlTypesToAnonymousParameterList(int[] types)
          Convert a list of JDBC types, as defined in the java.sql.Types class, to a List of SqlParameter objects as used in this package

Constructor Detail

SqlParameter

public SqlParameter(int type)
Add a new anonymous parameter

SqlParameter

public SqlParameter(int type, String typeName)

SqlParameter

public SqlParameter(String name, int type)

SqlParameter

public SqlParameter(String name, int type, String typeName)
Method Detail

getName

public String getName()

getSqlType

public int getSqlType()

getTypeName

public String getTypeName()

sqlTypesToAnonymousParameterList

public static List sqlTypesToAnonymousParameterList(int[] types)
Convert a list of JDBC types, as defined in the java.sql.Types class, to a List of SqlParameter objects as used in this package

Association Links

to Class java.lang.String

to Class java.lang.String

used for types that are user-named like: STRUCT, DISTINCT, JAVA_OBJECT, and named array types.