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
package com.vci.server.bof.server.create;
 
import com.vci.common.utility.ObjectUtility;
import com.vci.corba.common.VCIError;
import com.vci.corba.omd.data.LinkObject;
import com.vci.server.bof.server.ServiceFacadeExecuteHelper;
import com.vci.server.bof.service.LOFactoryService;
 
public class CreateLO extends ServiceFacadeExecuteHelper{
 
    private static ServiceFacadeExecuteHelper instance = null;
    
    public static ServiceFacadeExecuteHelper getInstance() {
        if(instance == null) {
            instance = new CreateLO();
        }
        return instance;
    }
    
    @Override
    protected Object doAction() throws Throwable {
        LinkObject lo = params.getLo();
        try {
            if (lo.oid.equals("")) {
                lo.oid = ObjectUtility.getNewObjectID36();
            }
            LOFactoryService services = LOFactoryService.getInstance();
            LinkObject rs = services.createLinkObject(lo);
            dealBusinessObjectNullValue(rs);
            return rs;
        } catch (VCIError e) {
            throw this.getLocalString(e.code, e);
        } catch (Exception e) {
            //e.printStackTrace();
            
            throw this.getLocalString("P0010LOL-00001", e);
        } catch (Throwable t) {
            
            //t.printStackTrace();
            throw this.getLocalString("P0010LOL-00001", t);
        }
    }
 
}