|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.jdbc.core.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
.
Types
Constructor Summary | |
SqlParameter(int sqlType)
Create a new anonymous SqlParameter, supplying SQL type. |
|
SqlParameter(int sqlType,
String typeName)
Create a new anonymous SqlParameter, supplying SQL type. |
|
SqlParameter(String name,
int sqlType)
Create a new SqlParameter, supplying name and SQL type. |
|
SqlParameter(String name,
int sqlType,
String typeName)
Create a new SqlParameter, supplying name and SQL type. |
Method Summary | |
String |
getName()
Return the name of the parameter. |
int |
getSqlType()
Return the SQL type of the parameter. |
String |
getTypeName()
Return the type name of the parameter, if any. |
static List |
sqlTypesToAnonymousParameterList(int[] types)
Convert a list of JDBC types, as defined in java.sql.Types ,
to a List of SqlParameter objects as used in this package. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SqlParameter(int sqlType)
sqlType
- SQL type of the parameter according to java.sql.Typespublic SqlParameter(int sqlType, String typeName)
sqlType
- SQL type of the parameter according to java.sql.TypestypeName
- the type name of the parameter (optional)public SqlParameter(String name, int sqlType)
name
- name of the parameter, as used in input and output mapssqlType
- SQL type of the parameter according to java.sql.Typespublic SqlParameter(String name, int sqlType, String typeName)
name
- name of the parameter, as used in input and output mapssqlType
- SQL type of the parameter according to java.sql.TypestypeName
- the type name of the parameter (optional)Method Detail |
public String getName()
public int getSqlType()
public String getTypeName()
public static List sqlTypesToAnonymousParameterList(int[] types)
java.sql.Types
,
to a List of SqlParameter objects as used in this package.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |