|
The Spring Framework | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.jdbc.core.SqlParameter
org.springframework.jdbc.core.SqlParameterValue
public class SqlParameterValue
Object to represent a SQL parameter value, including parameter metadata such as the SQL type and the scale for numeric values.
Designed for use with JdbcTemplate's operations that take an array of
argument values: Each such argument value may be a SqlParameterValue,
indicating the SQL type (and optionally the scale) instead of letting the
template guess a default type. Note that this only applies to the operations with
a 'plain' argument array, not to the overloaded variants with an explicit type array.
Types,
JdbcTemplate.query(String, Object[], ResultSetExtractor),
JdbcTemplate.query(String, Object[], RowCallbackHandler),
JdbcTemplate.query(String, Object[], RowMapper),
JdbcTemplate.update(String, Object[])| Constructor Summary | |
|---|---|
SqlParameterValue(int sqlType,
int scale,
Object value)
Create a new SqlParameterValue, supplying the SQL type. |
|
SqlParameterValue(int sqlType,
Object value)
Create a new SqlParameterValue, supplying the SQL type. |
|
SqlParameterValue(int sqlType,
String typeName,
Object value)
Create a new SqlParameterValue, supplying the SQL type. |
|
SqlParameterValue(SqlParameter declaredParam,
Object value)
Create a new SqlParameterValue based on the given SqlParameter declaration. |
|
| Method Summary | |
|---|---|
Object |
getValue()
Return the value object that this parameter value holds. |
| Methods inherited from class org.springframework.jdbc.core.SqlParameter |
|---|
getName, getScale, getSqlType, getTypeName, sqlTypesToAnonymousParameterList |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SqlParameterValue(int sqlType,
Object value)
sqlType - SQL type of the parameter according to java.sql.Typesvalue - the value object
public SqlParameterValue(int sqlType,
String typeName,
Object value)
sqlType - SQL type of the parameter according to java.sql.TypestypeName - the type name of the parameter (optional)value - the value object
public SqlParameterValue(int sqlType,
int scale,
Object value)
sqlType - SQL type of the parameter according to java.sql.Typesscale - the number of digits after the decimal point
(for DECIMAL and NUMERIC types)value - the value objectpublic SqlParameterValue(SqlParameter declaredParam, Object value)
declaredParam - the declared SqlParameter to define a value forvalue - the value object| Method Detail |
|---|
public Object getValue()
|
The Spring Framework | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||