Class SqlParameter
java.lang.Object
org.springframework.jdbc.core.SqlParameter
- Direct Known Subclasses:
- ResultSetSupportingSqlParameter,- SqlParameterValue,- SqlReturnUpdateCount
- 
Constructor SummaryConstructorsConstructorDescriptionSqlParameter(int sqlType) Create a new anonymous SqlParameter, supplying the SQL type.SqlParameter(int sqlType, int scale) Create a new anonymous SqlParameter, supplying the SQL type.SqlParameter(int sqlType, @Nullable String typeName) Create a new anonymous SqlParameter, supplying the SQL type.SqlParameter(String name, int sqlType) Create a new SqlParameter, supplying name and SQL type.SqlParameter(String name, int sqlType, int scale) Create a new SqlParameter, supplying name and SQL type.SqlParameter(String name, int sqlType, @Nullable String typeName) Create a new SqlParameter, supplying name and SQL type.SqlParameter(SqlParameter otherParam) Copy constructor.
- 
Method SummaryModifier and TypeMethodDescriptiongetName()Return the name of the parameter, ornullif anonymous.getScale()Return the scale of the parameter, if any.intReturn the SQL type of the parameter.Return the type name of the parameter, if any.booleanReturn whether this parameter holds input values that should be set before execution even if they arenull.booleanReturn whether this parameter is an implicit return parameter used during the results processing ofCallableStatement.getMoreResults/getUpdateCount.static List<SqlParameter> sqlTypesToAnonymousParameterList(int @Nullable ... types) Convert a list of JDBC types, as defined injava.sql.Types, to a List of SqlParameter objects as used in this package.
- 
Constructor Details- 
SqlParameterpublic SqlParameter(int sqlType) Create a new anonymous SqlParameter, supplying the SQL type.- Parameters:
- sqlType- the SQL type of the parameter according to- java.sql.Types
 
- 
SqlParameter
- 
SqlParameterpublic SqlParameter(int sqlType, int scale) Create a new anonymous SqlParameter, supplying the SQL type.- Parameters:
- sqlType- the SQL type of the parameter according to- java.sql.Types
- scale- the number of digits after the decimal point (for DECIMAL and NUMERIC types)
 
- 
SqlParameterCreate a new SqlParameter, supplying name and SQL type.- Parameters:
- name- the name of the parameter, as used in input and output maps
- sqlType- the SQL type of the parameter according to- java.sql.Types
 
- 
SqlParameterCreate a new SqlParameter, supplying name and SQL type.- Parameters:
- name- the name of the parameter, as used in input and output maps
- sqlType- the SQL type of the parameter according to- java.sql.Types
- typeName- the type name of the parameter (optional)
 
- 
SqlParameterCreate a new SqlParameter, supplying name and SQL type.- Parameters:
- name- the name of the parameter, as used in input and output maps
- sqlType- the SQL type of the parameter according to- java.sql.Types
- scale- the number of digits after the decimal point (for DECIMAL and NUMERIC types)
 
- 
SqlParameterCopy constructor.- Parameters:
- otherParam- the SqlParameter object to copy from
 
 
- 
- 
Method Details- 
getName
- 
getSqlTypepublic int getSqlType()Return the SQL type of the parameter.
- 
getTypeName
- 
getScale
- 
isInputValueProvidedpublic boolean isInputValueProvided()Return whether this parameter holds input values that should be set before execution even if they arenull.This implementation always returns true.
- 
isResultsParameterpublic boolean isResultsParameter()Return whether this parameter is an implicit return parameter used during the results processing ofCallableStatement.getMoreResults/getUpdateCount.This implementation always returns false.
- 
sqlTypesToAnonymousParameterListConvert a list of JDBC types, as defined injava.sql.Types, to a List of SqlParameter objects as used in this package.
 
-