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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package com.vci.server.workflow.server.service;
 
import java.util.List;
 
import com.vci.corba.common.VCIError;
import com.vci.server.base.persistence.dao.BaseService;
import com.vci.server.workflow.dao.PlwfpersonsetDaoImpl;
import com.vci.server.workflow.objects.Plwfpersonset;
 
public class PlwfpersonsetService extends BaseService{
    private static PlwfpersonsetService instance = null;
    
    private PlwfpersonsetService(){
        
    }
    
    public static PlwfpersonsetService getInstance(){
        if(instance == null){
            instance = new PlwfpersonsetService();
        }
        return instance;
    }    
 
    // add
    public boolean savePlwfpersonset(Plwfpersonset obj)
            throws VCIError {
 
        try {
            PlwfpersonsetDaoImpl daoImpl = new PlwfpersonsetDaoImpl();
            daoImpl.saveOrUpdate(obj);
            return true;
        } catch (Exception e) {
            e.printStackTrace();
            throw new VCIError("411116", new String[] {});
        }
    }
 
    // query
    public List<Plwfpersonset> getPlwfpersonset(String tid) throws VCIError {
        try {
            PlwfpersonsetDaoImpl daoImpl = new PlwfpersonsetDaoImpl();
            String hql ="from Plwfpersonset where pltempid='"+tid+"' order by plnodeorder asc";
            return daoImpl.findEntities(hql);
        } catch (Exception e) {
            e.printStackTrace();
            throw new VCIError("411117", new String[] {});
        }
    }
    // del
    public boolean deletePlwfpersonset(Plwfpersonset obj)
            throws VCIError {
        try {
            PlwfpersonsetDaoImpl daoImpl = new PlwfpersonsetDaoImpl();
            daoImpl.delete(obj);
            return true;
        } catch (Exception e) {
            e.printStackTrace();
            throw new VCIError("411118", new String[] {});
        }
 
    }
 
    
 
}