ludc
2025-01-16 986aa62ed00bee39363bab41b4eeb8259d446efd
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
package com.vci.server.bof.delegate;
 
import java.util.Map;
 
import com.vci.common.objects.UserEntity;
import com.vci.corba.common.VCIError;
import com.vci.server.bof.service.CustomSqlService;
 
public class CustomSqlServerDelegate extends FactoryBaseDelegate {
    
    private static CustomSqlServerDelegate instance = null;
 
    public static UserEntity userEntity = null;
    private CustomSqlServerDelegate() {
        userEntity = new UserEntity();
    }
    
    public static synchronized CustomSqlServerDelegate getInstance() {
        if (instance == null) {
            instance = new CustomSqlServerDelegate();
        }
        
        return instance;
    }
 
    public boolean executeUpdateSql(String sql) throws VCIError{
        boolean rs = false;
        try {
            rs = CustomSqlService.getInstance().executeUpdateSql(sql);
        } catch (Throwable t) {
            t.printStackTrace();
            throw this.getLocalString("P001OSOF-90001", t);
        }
        return rs;
    }
    public boolean executeUpdateSql(String sql,Map<String,String> params) throws VCIError{
        boolean rs = false;
        try {
            rs = CustomSqlService.getInstance().executeUpdateSql(sql,params);
        } catch (Throwable t) {
            t.printStackTrace();
            throw this.getLocalString("P001OSOF-90001", t);
        }
        return rs;
    }
    
}