public interface SimpleJdbcCallOperations
SimpleJdbcCall
.
This interface is not often used directly, but provides the
option to enhance testability, as it can easily be mocked or stubbed.Modifier and Type | Method and Description |
---|---|
SimpleJdbcCallOperations |
declareParameters(SqlParameter... sqlParameters)
Specify one or more parameters if desired.
|
java.util.Map<java.lang.String,java.lang.Object> |
execute(java.util.Map<java.lang.String,?> args)
Execute the stored procedure and return a map of output params, keyed by name as in parameter declarations..
|
java.util.Map<java.lang.String,java.lang.Object> |
execute(java.lang.Object... args)
Execute the stored procedure and return a map of output params, keyed by name as in parameter declarations.
|
java.util.Map<java.lang.String,java.lang.Object> |
execute(SqlParameterSource args)
Execute the stored procedure and return a map of output params, keyed by name as in parameter declarations..
|
<T> T |
executeFunction(java.lang.Class<T> returnType,
java.util.Map<java.lang.String,?> args)
Execute the stored function and return the results obtained as an Object of the specified return type.
|
<T> T |
executeFunction(java.lang.Class<T> returnType,
java.lang.Object... args)
Execute the stored function and return the results obtained as an Object of the specified return type.
|
<T> T |
executeFunction(java.lang.Class<T> returnType,
SqlParameterSource args)
Execute the stored function and return the results obtained as an Object of the specified return type.
|
<T> T |
executeObject(java.lang.Class<T> returnType,
java.util.Map<java.lang.String,?> args)
Execute the stored procedure and return the single out parameter as an Object of the specified return type.
|
<T> T |
executeObject(java.lang.Class<T> returnType,
java.lang.Object... args)
Execute the stored procedure and return the single out parameter as an Object of the specified return type.
|
<T> T |
executeObject(java.lang.Class<T> returnType,
SqlParameterSource args)
Execute the stored procedure and return the single out parameter as an Object of the specified return type.
|
SimpleJdbcCallOperations |
returningResultSet(java.lang.String parameterName,
ParameterizedRowMapper rowMapper)
Deprecated.
|
SimpleJdbcCallOperations |
returningResultSet(java.lang.String parameterName,
RowMapper rowMapper)
Used to specify when a ResultSet is returned by the stored procedure and you want it mapped
by a RowMapper.
|
SimpleJdbcCallOperations |
useInParameterNames(java.lang.String... inParameterNames)
Not used yet
|
SimpleJdbcCallOperations |
withCatalogName(java.lang.String catalogName)
Optionally, specify the name of the catalog that contins the stored procedure.
|
SimpleJdbcCallOperations |
withFunctionName(java.lang.String functionName)
Specify the procedure name to be used - this implies that we will be calling a stored function.
|
SimpleJdbcCallOperations |
withoutProcedureColumnMetaDataAccess()
Turn off any processing of parameter meta data information obtained via JDBC.
|
SimpleJdbcCallOperations |
withProcedureName(java.lang.String procedureName)
Specify the procedure name to be used - this implies that we will be calling a stored procedure.
|
SimpleJdbcCallOperations |
withReturnValue()
Indicates the procedure's return value should be included in the results returned.
|
SimpleJdbcCallOperations |
withSchemaName(java.lang.String schemaName)
Optionally, specify the name of the schema that contins the stored procedure.
|
SimpleJdbcCallOperations withProcedureName(java.lang.String procedureName)
procedureName
- the name of the stored procedureSimpleJdbcCallOperations withFunctionName(java.lang.String functionName)
functionName
- the name of the stored functionSimpleJdbcCallOperations withSchemaName(java.lang.String schemaName)
schemaName
- the name of the schemaSimpleJdbcCallOperations withCatalogName(java.lang.String catalogName)
catalogName
- the catalog or package nameSimpleJdbcCallOperations withReturnValue()
SimpleJdbcCallOperations declareParameters(SqlParameter... sqlParameters)
SqlParameter
and SqlInOutParameter
will be used to provide input values. This is different from the StoredProcedure
class
which for backwards compatibility reasons allows input values to be provided for parameters declared
as SqlOutParameter
.sqlParameters
- the parameters to useSimpleJdbcCallOperations useInParameterNames(java.lang.String... inParameterNames)
SimpleJdbcCallOperations returningResultSet(java.lang.String parameterName, RowMapper rowMapper)
parameterName
- the name of the returned results and/or the name of the ref cursor parameterrowMapper
- the RowMapper implementation that will map the data returned for each row@Deprecated SimpleJdbcCallOperations returningResultSet(java.lang.String parameterName, ParameterizedRowMapper rowMapper)
returningResultSet(String, org.springframework.jdbc.core.RowMapper)
SimpleJdbcCallOperations withoutProcedureColumnMetaDataAccess()
<T> T executeFunction(java.lang.Class<T> returnType, java.lang.Object... args)
returnType
- the type of the value to returnargs
- optional array containing the in parameter values to be used in the call.
Parameter values must be provided in the same order as the parameters are defined
for the stored procedure.<T> T executeFunction(java.lang.Class<T> returnType, java.util.Map<java.lang.String,?> args)
returnType
- the type of the value to returnargs
- Map containing the parameter values to be used in the call.<T> T executeFunction(java.lang.Class<T> returnType, SqlParameterSource args)
returnType
- the type of the value to returnargs
- MapSqlParameterSource containing the parameter values to be used in the call.<T> T executeObject(java.lang.Class<T> returnType, java.lang.Object... args)
returnType
- the type of the value to returnargs
- optional array containing the in parameter values to be used in the call. Parameter values must
be provided in the same order as the parameters are defined for the stored procedure.<T> T executeObject(java.lang.Class<T> returnType, java.util.Map<java.lang.String,?> args)
returnType
- the type of the value to returnargs
- Map containing the parameter values to be used in the call.<T> T executeObject(java.lang.Class<T> returnType, SqlParameterSource args)
returnType
- the type of the value to returnargs
- MapSqlParameterSource containing the parameter values to be used in the call.java.util.Map<java.lang.String,java.lang.Object> execute(java.lang.Object... args)
args
- optional array containing the in parameter values to be used in the call. Parameter values must
be provided in the same order as the parameters are defined for the stored procedure.java.util.Map<java.lang.String,java.lang.Object> execute(java.util.Map<java.lang.String,?> args)
args
- Map containing the parameter values to be used in the call.java.util.Map<java.lang.String,java.lang.Object> execute(SqlParameterSource args)
args
- SqlParameterSource containing the parameter values to be used in the call.