Browse Source

changed MapSqlParameterSource to SqlParameterSource in executeFunction and executeObject methods for SimpleJdbcCall (SPR-5570)

conversation
Thomas Risberg 16 years ago
parent
commit
4dc4ce3275
  1. 9
      org.springframework.jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCall.java
  2. 9
      org.springframework.jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCallOperations.java

9
org.springframework.jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCall.java

@ -25,7 +25,6 @@ import javax.sql.DataSource; @@ -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 @@ -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());
}

9
org.springframework.jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCallOperations.java

@ -19,7 +19,6 @@ package org.springframework.jdbc.core.simple; @@ -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 { @@ -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 { @@ -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 { @@ -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…
Cancel
Save