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.
java.sql.Types , JdbcTemplate#query(String, ResultSetExtractor, Object[]), JdbcTemplate#query(String, RowCallbackHandler, Object[]), JdbcTemplate#query(String, RowMapper, Object[]), JdbcTemplate#update(String, Object[])
| Access | Constructor and Description |
|---|---|
| public | SqlParameterValue(int
the SQL type of the parameter according to sqlType, Object java.sql.Typesthe value object value)Create a new SqlParameterValue, supplying the SQL type. |
| public | SqlParameterValue(int
the SQL type of the parameter according to sqlType, String java.sql.Typesthe type name of the parameter (optional) typeName, Object the value object value)Create a new SqlParameterValue, supplying the SQL type. |
| public | SqlParameterValue(int
the SQL type of the parameter according to sqlType, int java.sql.Typesthe number of digits after the decimal point
(for DECIMAL and NUMERIC types) scale, Object the value object value)Create a new SqlParameterValue, supplying the SQL type. |
| public | SqlParameterValue(SqlParameter
the declared SqlParameter to define a value for declaredParam, Object the value object value)Create a new SqlParameterValue based on the given SqlParameter declaration. |
| Modifier and Type | Method and Description |
|---|---|
| public Object |
| value | back to summary |
|---|---|
| private final Object value
| |
| SqlParameterValue | back to summary |
|---|---|
| public SqlParameterValue(int sqlType, Object value) Create a new SqlParameterValue, supplying the SQL type.
| |
| SqlParameterValue | back to summary |
|---|---|
| public SqlParameterValue(int sqlType, String typeName, Object value) Create a new SqlParameterValue, supplying the SQL type. | |
| SqlParameterValue | back to summary |
|---|---|
| public SqlParameterValue(int sqlType, int scale, Object value) Create a new SqlParameterValue, supplying the SQL type.
| |
| SqlParameterValue | back to summary |
|---|---|
| public SqlParameterValue(SqlParameter declaredParam, Object value) Create a new SqlParameterValue based on the given SqlParameter declaration.
| |
| getValue | back to summary |
|---|---|
| public Object getValue() Return the value object that this parameter value holds.
| |