changed MapSqlParameterSource to SqlParameterSource in executeFunction and executeObject methods for SimpleJdbcCall (SPR-5570)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@820 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
parent
ef5bde43b6
commit
88cc7a08f8
|
|
@ -25,7 +25,6 @@ import javax.sql.DataSource;
|
|||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.jdbc.core.SqlParameter;
|
||||
import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
|
||||
import org.springframework.jdbc.core.namedparam.SqlParameterSource;
|
||||
|
||||
/**
|
||||
|
|
@ -133,22 +132,22 @@ public class SimpleJdbcCall extends AbstractJdbcCall implements SimpleJdbcCallOp
|
|||
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T executeFunction(Class<T> returnType, Map args) {
|
||||
public <T> T executeFunction(Class<T> returnType, Map<String, Object> args) {
|
||||
return (T) doExecute(args).get(getScalarOutParameterName());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T executeFunction(Class<T> returnType, MapSqlParameterSource args) {
|
||||
public <T> T executeFunction(Class<T> returnType, SqlParameterSource args) {
|
||||
return (T) doExecute(args).get(getScalarOutParameterName());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T executeObject(Class<T> returnType, Map args) {
|
||||
public <T> T executeObject(Class<T> returnType, Map<String, Object> args) {
|
||||
return (T) doExecute(args).get(getScalarOutParameterName());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T executeObject(Class<T> returnType, MapSqlParameterSource args) {
|
||||
public <T> T executeObject(Class<T> returnType, SqlParameterSource args) {
|
||||
return (T) doExecute(args).get(getScalarOutParameterName());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ package org.springframework.jdbc.core.simple;
|
|||
import java.util.Map;
|
||||
|
||||
import org.springframework.jdbc.core.SqlParameter;
|
||||
import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
|
||||
import org.springframework.jdbc.core.namedparam.SqlParameterSource;
|
||||
|
||||
/**
|
||||
|
|
@ -107,14 +106,14 @@ public interface SimpleJdbcCallOperations {
|
|||
* @param returnType the type of the value to return
|
||||
* @param args Map containing the parameter values to be used in the call.
|
||||
*/
|
||||
<T> T executeFunction(Class<T> returnType, Map args);
|
||||
<T> T executeFunction(Class<T> returnType, Map<String, Object> args);
|
||||
|
||||
/**
|
||||
* Execute the stored function and return the results obtained as an Object of the specified return type.
|
||||
* @param returnType the type of the value to return
|
||||
* @param args MapSqlParameterSource containing the parameter values to be used in the call.
|
||||
*/
|
||||
<T> T executeFunction(Class<T> returnType, MapSqlParameterSource args);
|
||||
<T> T executeFunction(Class<T> returnType, SqlParameterSource args);
|
||||
|
||||
/**
|
||||
* Execute the stored procedure and return the single out parameter as an Object of the specified return type.
|
||||
|
|
@ -123,7 +122,7 @@ public interface SimpleJdbcCallOperations {
|
|||
* @param returnType the type of the value to return
|
||||
* @param args Map containing the parameter values to be used in the call.
|
||||
*/
|
||||
<T> T executeObject(Class<T> returnType, Map args);
|
||||
<T> T executeObject(Class<T> returnType, Map<String, Object> args);
|
||||
|
||||
/**
|
||||
* Execute the stored procedure and return the single out parameter as an Object of the specified return type.
|
||||
|
|
@ -132,7 +131,7 @@ public interface SimpleJdbcCallOperations {
|
|||
* @param returnType the type of the value to return
|
||||
* @param args MapSqlParameterSource containing the parameter values to be used in the call.
|
||||
*/
|
||||
<T> T executeObject(Class<T> returnType, MapSqlParameterSource args);
|
||||
<T> T executeObject(Class<T> returnType, SqlParameterSource args);
|
||||
|
||||
/**
|
||||
* Execute the stored procedure and return a map of output params, keyed by name as in parameter declarations..
|
||||
|
|
|
|||
Loading…
Reference in New Issue