Package org.springframework.jdbc.core
Class SqlOutParameter
- java.lang.Object
- org.springframework.jdbc.core.SqlParameter
- org.springframework.jdbc.core.ResultSetSupportingSqlParameter
- org.springframework.jdbc.core.SqlOutParameter
- Direct Known Subclasses:
SqlInOutParameter
public class SqlOutParameter extends ResultSetSupportingSqlParameter
Subclass ofSqlParameterto represent an output parameter. No additional properties: instanceof will be used to check for such types.Output parameters - like all stored procedure parameters - must have names.
- Author:
- Rod Johnson, Thomas Risberg, Juergen Hoeller
- See Also:
SqlReturnResultSet,SqlInOutParameter
Constructor Summary
Constructors Constructor Description SqlOutParameter(String name, int sqlType)Create a new SqlOutParameter.SqlOutParameter(String name, int sqlType, int scale)Create a new SqlOutParameter.SqlOutParameter(String name, int sqlType, String typeName)Create a new SqlOutParameter.SqlOutParameter(String name, int sqlType, String typeName, SqlReturnType sqlReturnType)Create a new SqlOutParameter.SqlOutParameter(String name, int sqlType, ResultSetExtractor<?> rse)Create a new SqlOutParameter.SqlOutParameter(String name, int sqlType, RowCallbackHandler rch)Create a new SqlOutParameter.SqlOutParameter(String name, int sqlType, RowMapper<?> rm)Create a new SqlOutParameter.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SqlReturnTypegetSqlReturnType()Return the custom return type, if any.booleanisReturnTypeSupported()Return whether this parameter holds a custom return type.Methods inherited from class org.springframework.jdbc.core.ResultSetSupportingSqlParameter
getResultSetExtractor, getRowCallbackHandler, getRowMapper, isInputValueProvided, isResultSetSupported
Methods inherited from class org.springframework.jdbc.core.SqlParameter
getName, getScale, getSqlType, getTypeName, isResultsParameter, sqlTypesToAnonymousParameterList
Constructor Detail
SqlOutParameter
public SqlOutParameter(String name, int sqlType)
Create a new SqlOutParameter.- Parameters:
name- name of the parameter, as used in input and output mapssqlType- SQL type of the parameter according to java.sql.Types
SqlOutParameter
public SqlOutParameter(String name, int sqlType, int scale)
Create a new SqlOutParameter.- 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)
SqlOutParameter
public SqlOutParameter(String name, int sqlType, String typeName)
Create a new SqlOutParameter.- 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)
SqlOutParameter
public SqlOutParameter(String name, int sqlType, String typeName, SqlReturnType sqlReturnType)
Create a new SqlOutParameter.- 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)
SqlOutParameter
public SqlOutParameter(String name, int sqlType, ResultSetExtractor<?> rse)
Create a new SqlOutParameter.- 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
SqlOutParameter
public SqlOutParameter(String name, int sqlType, RowCallbackHandler rch)
Create a new SqlOutParameter.- 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
SqlOutParameter
public SqlOutParameter(String name, int sqlType, RowMapper<?> rm)
Create a new SqlOutParameter.- 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
getSqlReturnType
public SqlReturnType getSqlReturnType()
Return the custom return type, if any.
isReturnTypeSupported
public boolean isReturnTypeSupported()
Return whether this parameter holds a custom return type.