Package org.springframework.jdbc.core
Class SqlInOutParameter
- java.lang.Object
- org.springframework.jdbc.core.SqlParameter
- org.springframework.jdbc.core.ResultSetSupportingSqlParameter
- org.springframework.jdbc.core.SqlOutParameter
- org.springframework.jdbc.core.SqlInOutParameter
public class SqlInOutParameter extends SqlOutParameter
Subclass ofSqlOutParameterto represent an INOUT parameter. Will returntruefor SqlParameter'sisInputValueProvided()test, in contrast to a standard SqlOutParameter.Output parameters - like all stored procedure parameters - must have names.
- Since:
- 2.0
- Author:
- Thomas Risberg, Juergen Hoeller
Constructor Summary
Constructors Constructor Description SqlInOutParameter(String name, int sqlType)Create a new SqlInOutParameter.SqlInOutParameter(String name, int sqlType, int scale)Create a new SqlInOutParameter.SqlInOutParameter(String name, int sqlType, String typeName)Create a new SqlInOutParameter.SqlInOutParameter(String name, int sqlType, String typeName, SqlReturnType sqlReturnType)Create a new SqlInOutParameter.SqlInOutParameter(String name, int sqlType, ResultSetExtractor<?> rse)Create a new SqlInOutParameter.SqlInOutParameter(String name, int sqlType, RowCallbackHandler rch)Create a new SqlInOutParameter.SqlInOutParameter(String name, int sqlType, RowMapper<?> rm)Create a new SqlInOutParameter.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisInputValueProvided()This implementation always returnstrue.Methods inherited from class org.springframework.jdbc.core.SqlOutParameter
getSqlReturnType, isReturnTypeSupported
Methods inherited from class org.springframework.jdbc.core.ResultSetSupportingSqlParameter
getResultSetExtractor, getRowCallbackHandler, getRowMapper, isResultSetSupported
Methods inherited from class org.springframework.jdbc.core.SqlParameter
getName, getScale, getSqlType, getTypeName, isResultsParameter, sqlTypesToAnonymousParameterList
Constructor Detail
SqlInOutParameter
public SqlInOutParameter(String name, int sqlType)
Create a new SqlInOutParameter.- Parameters:
name- name of the parameter, as used in input and output mapssqlType- SQL type of the parameter according to java.sql.Types
SqlInOutParameter
public SqlInOutParameter(String name, int sqlType, int scale)
Create a new SqlInOutParameter.- Parameters:
name- name of the parameter, as used in input and output mapssqlType- SQL type of the parameter according to java.sql.Typesscale- the number of digits after the decimal point (for DECIMAL and NUMERIC types)
SqlInOutParameter
public SqlInOutParameter(String name, int sqlType, String typeName)
Create a new SqlInOutParameter.- Parameters:
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)
SqlInOutParameter
public SqlInOutParameter(String name, int sqlType, String typeName, SqlReturnType sqlReturnType)
Create a new SqlInOutParameter.- Parameters:
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)sqlReturnType- custom value handler for complex type (optional)
SqlInOutParameter
public SqlInOutParameter(String name, int sqlType, ResultSetExtractor<?> rse)
Create a new SqlInOutParameter.- Parameters:
name- name of the parameter, as used in input and output mapssqlType- SQL type of the parameter according to java.sql.Typesrse- ResultSetExtractor to use for parsing the ResultSet
SqlInOutParameter
public SqlInOutParameter(String name, int sqlType, RowCallbackHandler rch)
Create a new SqlInOutParameter.- Parameters:
name- name of the parameter, as used in input and output mapssqlType- SQL type of the parameter according to java.sql.Typesrch- RowCallbackHandler to use for parsing the ResultSet
SqlInOutParameter
public SqlInOutParameter(String name, int sqlType, RowMapper<?> rm)
Create a new SqlInOutParameter.- Parameters:
name- name of the parameter, as used in input and output mapssqlType- SQL type of the parameter according to java.sql.Typesrm- RowMapper to use for parsing the ResultSet
Method Detail
isInputValueProvided
public boolean isInputValueProvided()
This implementation always returnstrue.- Overrides:
isInputValueProvidedin classResultSetSupportingSqlParameter