Class sqlParameterValue
java.lang.Object
org.springframework.jdbc.core.sqlParameter
org.springframework.jdbc.core.sqlParameterValue
Object to represent an sQL parameter value, including parameter meta-data
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.
- since:
- 2.0.5
- Author:
- Juergen Hoeller
- see Also:
-
Constructor summary
ConstructorsConstructorDescriptionsqlParameterValue(int sqlType, int scale, @Nullable Object value) Create a new sqlParameterValue, supplying the sQL type.sqlParameterValue(int sqlType, @Nullable Object value) Create a new sqlParameterValue, supplying the sQL type.sqlParameterValue(int sqlType, @Nullable string typeName, @Nullable Object value) Create a new sqlParameterValue, supplying the sQL type.sqlParameterValue(sqlParameter declaredParam, @Nullable Object value) Create a new sqlParameterValue based on the given sqlParameter declaration. -
Method summary
Methods inherited from class sqlParameter
getName, getscale, getsqlType, getTypeName, isInputValueProvided, isResultsParameter, sqlTypesToAnonymousParameterList
-
Constructor Details
-
sqlParameterValue
-
sqlParameterValue
public sqlParameterValue(int sqlType, @Nullable string typeName, @Nullable Object value) Create a new sqlParameterValue, supplying the sQL type.- Parameters:
sqlType- the sQL type of the parameter according tojava.sql.TypestypeName- the type name of the parameter (optional)value- the value object
-
sqlParameterValue
Create a new sqlParameterValue, supplying the sQL type.- Parameters:
sqlType- the sQL type of the parameter according tojava.sql.Typesscale- the number of digits after the decimal point (for DECIMAL and NUMERIC types)value- the value object
-
sqlParameterValue
Create a new sqlParameterValue based on the given sqlParameter declaration.- Parameters:
declaredParam- the declared sqlParameter to define a value forvalue- the value object
-
-
Method Details
-
getValue
-