DecideSaveTableManager.java
1.74 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package com.sitech.ismp.ice.syslogd;
import java.util.HashMap;
import java.util.Map;
import com.sitech.ismp.pattern.TableProcess;
import com.sitech.util.Formater;
/**
*
*
* @author zhangdj Email:Mirror_Jean@qq.com
* @version , Nov 16, 2010
*
*/
public class DecideSaveTableManager extends TableProcess {
HashMap resultMap = null;
public void setTable() throws Exception {
resultMap = new HashMap();
resultMap.put("UNIT_ID", Formater.fromDBString(rs.getString(1)));
resultMap.put("PROCESS_ID", Formater.fromDBString(rs.getString(2)));
resultMap.put("UPDATE_TIME", Formater.fromDBString(rs.getString(3)));
recordSet.add(resultMap);
}
public java.util.Vector search(Map params) throws Exception{
super.setConnection();
SQL = "select UNIT_ID,PROCESS_ID,UPDATE_TIME from TB_DECIDE_MANAGER where UNIT_ID='"+params.get("UNIT_ID")+"'";
System.out.println("find SQL = "+SQL);
exeQuery(SQL);
super.freeConnection();
System.out.println("FIND OVER!");
return recordSet;
}
public void delete(String UNIT_ID) throws Exception{
super.setConnection();
SQL = "delete TB_DECIDE_MANAGER where UNIT_ID='"+UNIT_ID+"'";
exeUpdateSQL(SQL);
super.freeConnection();
}
public void modify(Map params) throws Exception{
super.setConnection();
SQL = "update TB_DECIDE_MANAGER set PROCESS_ID='"+params.get("PROCESS_ID")+"',UPDATE_TIME=sysdate where UNIT_ID='"+params.get("UNIT_ID")+"'";
exeUpdateSQL(SQL);
}
public boolean add(Map params) throws Exception{
super.setConnection();
SQL = "insert into TB_DECIDE_MANAGER(UNIT_ID,PROCESS_ID,UPDATE_TIME) values('"+params.get("UNIT_ID")+"','"+params.get("PROCESS_ID")+"',sysdate)";
System.out.println("insert SQL = "+SQL);
exeInsertSQL(SQL);
super.freeConnection();
return true;
}
}