forked from pgy1/JavaUtil
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSqlCallUtil.java
More file actions
41 lines (33 loc) · 1.08 KB
/
SqlCallUtil.java
File metadata and controls
41 lines (33 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package cn.sinobest.ypgj.util;
import java.sql.Timestamp;
import java.sql.Types;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import javax.sql.DataSource;
import org.springframework.jdbc.core.SqlOutParameter;
import org.springframework.jdbc.core.SqlParameter;
import org.springframework.jdbc.object.StoredProcedure;
import cn.sinobest.jzpt.framework.utils.JdbcService;
/**
*
* @author: lihaoquan
* @Description: 调用Oracle数据库中的通用函数方法
*/
public class SqlCallUtil extends StoredProcedure {
public SqlCallUtil(DataSource dataSource,String f_sql,Map<String,String> paramMap) {
super(dataSource,f_sql);
try{
setFunction(true);
declareParameter(new SqlOutParameter("RETURNDATA", Types.VARCHAR));
Iterator<Entry<String, String>> iter = paramMap.entrySet().iterator();
while(iter.hasNext()) {
Entry<String, String> entry = iter.next();
declareParameter(new SqlParameter(entry.getKey(), Types.VARCHAR));
}
compile();
}catch (Exception e) {
System.out.println("缺少返回数据信息 !!!");
}
}
}