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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
package com.vci.server.bof.delegate;
 
import java.util.HashMap;
import java.util.Map;
 
import javax.xml.rpc.holders.LongHolder;
 
import org.omg.CORBA.StringHolder;
 
import com.vci.corba.omd.data.AttributeValue;
import com.vci.corba.omd.data.BusinessObject;
import com.vci.corba.omd.data.LinkObject;
import com.vci.corba.omd.data.RevisionDataInfo;
import com.vci.corba.omd.data.VersionDataInfo;
import com.vci.corba.omd.lcm.TransitionVO;
import com.vci.server.base.utility.OmdHelper;
import com.vci.server.bof.server.create.BatchCUDBOLO;
import com.vci.server.bof.server.create.BatchCreateBO;
import com.vci.server.bof.server.create.BatchCreateBOLO;
import com.vci.server.bof.server.create.BatchCreateBOLONoCheckLog;
import com.vci.server.bof.server.create.BatchCreateBOLOTS;
import com.vci.server.bof.server.create.BatchCreateDeleteBOLO;
import com.vci.server.bof.server.create.CreateBO;
import com.vci.server.bof.server.create.CreateBOLO;
import com.vci.server.bof.server.create.CreateBOLOTS;
import com.vci.server.bof.server.delete.BatchDeleteBO;
import com.vci.server.bof.server.delete.DeleteBO;
import com.vci.server.bof.server.transfer.BatchTransferBO;
import com.vci.server.bof.server.transfer.TransferBO;
import com.vci.server.bof.server.update.BatchChangeBOOwner;
import com.vci.server.bof.server.update.BatchUpdateBO;
import com.vci.server.bof.server.update.ChangeBOOwner;
import com.vci.server.bof.server.update.UpdateBO;
import com.vci.server.bof.server.update.check.BatchCheckInBO;
import com.vci.server.bof.server.update.check.BatchCheckOutBO;
import com.vci.server.bof.server.update.check.BatchUndoCheckOutBO;
import com.vci.server.bof.server.update.check.CheckInBO;
import com.vci.server.bof.server.update.check.CheckOutBO;
import com.vci.server.bof.server.update.check.UndoCheckOutBO;
import com.vci.server.bof.server.update.revision.BatchRevisionBO;
import com.vci.server.bof.service.BOFactoryBatchServices;
import com.vci.server.bof.service.BOFactoryServices;
import com.vci.common.objects.UserEntity;
import com.vci.corba.common.VCIError;
import com.vci.corba.framework.data.UserInfo;
 
public class BOFactoryServerDelegate extends FactoryBaseDelegate {
    
    private static BOFactoryServerDelegate instance = null;
    public static UserEntity userEntity = null;
    
    private BOFactoryServerDelegate() {
        userEntity = new UserEntity();
    }
    
    public static synchronized BOFactoryServerDelegate getInstance() {
        if (instance == null) {
            instance = new BOFactoryServerDelegate();
        }
        return instance;
    }
    
    /**
     * 存储单个BO对象
     * @param bo
     * @param isRevision
     * @param isNewVersion
     * @return
     * @throws VCIError
     */
    public BusinessObject createBusinessObject(BusinessObject bo, boolean isRevision, boolean isNewVersion) throws VCIError {
        return (BusinessObject) CreateBO.getInstance().doExecute(bo, isRevision, isNewVersion);
    }
    
    /**
     * 批量保持BO对象
     * @param bos
     * @param isRevision
     * @param isNewVersion
     * @return
     * @throws VCIError
     */
    public BusinessObject[] batchCreateBusinessObject(BusinessObject[] bos, boolean isRevision, boolean isNewVersion) throws VCIError {
        return (BusinessObject[]) BatchCreateBO.getInstance().doExecute(bos, isRevision, isNewVersion);
    }
    
    public boolean createBusinessObject(BusinessObject[] bos, LinkObject lo) throws VCIError {
        return (Boolean) CreateBOLO.getInstance().doExecute(bos, lo);
    }
    
    public boolean batchCreateBusinessObjectWithLink(BusinessObject[] bos,
            LinkObject[] los) throws VCIError {
        return (Boolean) BatchCreateBOLO.getInstance().doExecute(bos, los);
    }
    
    /**
     * 批量存储业务对象,不进行错误检查,不记录日志
     * @param bos
     * @param los
     * @return
     * @throws VCIError
     */
    public boolean batchCreateBOWithLinkNoCheckNoLog(BusinessObject[] bos,
            LinkObject[] los) throws VCIError {
        return (Boolean) BatchCreateBOLONoCheckLog.getInstance().doExecute(bos, los);
    }
    
    public boolean batchCreateDeleteBOLO(BusinessObject[] createBOs,
                LinkObject[] createLOs, BusinessObject[] deleteBOs,
                LinkObject[] deleteLOs) throws VCIError {
        return (Boolean) BatchCreateDeleteBOLO.getInstance().
                doExecute(createBOs, createLOs, deleteBOs, deleteLOs);
    }
    
    public boolean batchCUDBOLO(BusinessObject[] createBOs,
            LinkObject[] createLOs, BusinessObject[] updateBOs,
            LinkObject[] updateLOs, BusinessObject[] deleteBOs,
            LinkObject[] deleteLOs) throws VCIError {
        return (Boolean) BatchCUDBOLO.getInstance().
                doExecute(createBOs, createLOs, updateBOs, updateLOs, deleteBOs, deleteLOs);
    }
    
    public boolean CreateBusinessObjectWithLinkTS(BusinessObject[] bos,
            LinkObject lo, LongHolder ts) throws VCIError {
        return (Boolean) CreateBOLOTS.getInstance().doExecute(bos, lo, ts);
    }
    
    public boolean batchCreateBusinessObjectWithLinkTS(BusinessObject[] bos,
            LinkObject[] los, LongHolder ts) throws VCIError {
        return (Boolean) BatchCreateBOLOTS.getInstance().doExecute(bos, los, ts);
    }
    
    /**
     * 批量升版本
     * @param oids
     * @param btmName
     * @return
     * @throws VCIError
     */
    public boolean batchRevisonBusinessObject(String[] oids, String btmName) throws VCIError {
        return (Boolean) BatchRevisionBO.getInstance().doExecute(oids, btmName);
    }
    
    /**
     * 更改BO对象属性信息
     * @param bo
     * @return
     * @throws VCIError
     */
    public boolean updateBuinessObject(BusinessObject bo) throws VCIError {
        return (Boolean) UpdateBO.getInstance().doExecute(bo);
    }
    
    /**
     * 批量更改BO对象属性信息
     * @param bos
     * @return
     * @throws VCIError
     */
    public boolean batchUpdateBusinessObject(BusinessObject[] bos) throws VCIError {
        return (Boolean) BatchUpdateBO.getInstance().doExecute(bos);
    }
    
    /**
     * 按版本、版次、主对象等三种类型进行BO对象的删除
     * @param bo
     * @param type
     * @return
     * @throws VCIError
     */
    public boolean deleteBusinessObject(BusinessObject bo, int type) throws VCIError {
        return (Boolean) DeleteBO.getInstance().doExecute(bo, type);
    }
    
    public boolean batchDeleteBusinessObject(BusinessObject[] bos, int type)
            throws VCIError {
        return (Boolean) BatchDeleteBO.getInstance().doExecute(bos, type);
    }
    
    public BusinessObject getInfoBusinessObject(String oid, String btmName) throws VCIError {
        try {
            BOFactoryServices services = BOFactoryServices.getInstance();
            BusinessObject bo = services.getInfoBusinessObject(oid, btmName);
            dealBusinessObjectNullValue(bo);
            return bo;
        } catch (Exception e) {
            e.printStackTrace();
            
            throw this.getLocalString("P0010SOF-00004", e);
        } catch (Throwable t) {
            
            
            
            t.printStackTrace();
            throw this.getLocalString("P0010SOF-00004", t);
        }
    }
    
    public BusinessObject[] getLastRevisionBusinessObject(String nameoid, String btmName) throws VCIError {
        try {
            BOFactoryServices services = BOFactoryServices.getInstance();
            BusinessObject[] bos = services.getLastRevisionBusinessObject(nameoid, btmName);
            for (int i = 0; i < bos.length; i++) {
                dealBusinessObjectNullValue(bos[i]);
            }
            
            return bos;
        } catch (Exception e) {
            e.printStackTrace();
            
            throw this.getLocalString("P0010SOF-00004", e);
        } catch (Throwable t) {
            
            t.printStackTrace();
            throw this.getLocalString("P0010SOF-00004", t);
        }
    }
    
    public BusinessObject[] getBatchBusinessObject(String[] oids, String btmName) throws VCIError {
        try {
            BOFactoryBatchServices services = BOFactoryBatchServices.getInstance();
            
            long stime = System.currentTimeMillis();
            BusinessObject[] bos = services.getBatchBusinessObject(oids, btmName);
            long etime = System.currentTimeMillis();
            System.out.printf("===============getBatchBusinessObject 执行时长:%d 毫秒.==================", (etime - stime));
            
            stime = System.currentTimeMillis();
            bos = services.getBatchBusinessObjectByTempOIDs(oids, btmName);
            etime = System.currentTimeMillis();
            System.out.printf("===============getBatchBusinessObjectByTempOIDs 执行时长:%d 毫秒.==================", (etime - stime));
            
            for (int i = 0; i < bos.length; i++) {
                dealBusinessObjectNullValue(bos[i]);
            }
            
            return bos;
        } catch (Exception e) {
            e.printStackTrace();
            
            throw this.getLocalString("P0010SOF-00004", e);
        } catch (Throwable t) {
            
            t.printStackTrace();
            throw this.getLocalString("P0010SOF-00004", t);
        }
    }
    
    public BusinessObject[] getBatchBusinessObjects(String btmName, int page, int pageSize) throws VCIError {
        try {
            BOFactoryBatchServices services = BOFactoryBatchServices.getInstance();
            BusinessObject[] bos = services.getBatchBusinessObjects(btmName, page, pageSize);
            for (int i = 0; i < bos.length; i++) {
                dealBusinessObjectNullValue(bos[i]);
            }
            
            return bos;
        } catch (Exception e) {
            e.printStackTrace();
            
            throw this.getLocalString("P0010SOF-00004", e);
        } catch (Throwable t) {
            
            t.printStackTrace();
            throw this.getLocalString("P0010SOF-00004", t);
        }
    }
    
    /**
     * 检入对象
     * @param bo
     * @return
     * @throws VCIError
     */
    public boolean checkInBusinessObject(BusinessObject bo) throws VCIError {
        return (Boolean) CheckInBO.getInstance().doExecute(bo);
    }
    
    /**
     * 批量检入对象
     * @param bos
     * @return
     * @throws VCIError
     */
    public boolean batchCheckInBusinessObject(BusinessObject[] bos)
            throws VCIError {
        return (Boolean) BatchCheckInBO.getInstance().doExecute(bos);
    }
    
    /**
     * 检出对象
     * @param bo
     * @return
     * @throws VCIError
     */
    public boolean checkoutBusinessObject(BusinessObject bo) throws VCIError {
        return (Boolean) CheckOutBO.getInstance().doExecute(bo);
    }
    
    public boolean batchCheckoutBusinessObject(BusinessObject[] bos)
            throws VCIError {
        return (Boolean) BatchCheckOutBO.getInstance().doExecute(bos);
    }
    
    /**
     * 撤销检出对象
     * @param bo
     * @return
     * @throws VCIError
     */
    public boolean undoCheckoutBusinessObject(BusinessObject bo) throws VCIError {
        return (Boolean) UndoCheckOutBO.getInstance().doExecute(bo);
    }
    
    /**
     * 批量撤销检出对象
     * @param bos
     * @return
     * @throws VCIError
     */
    public boolean batchUnCheckOutBusinessObject(BusinessObject[] bos) throws VCIError {
         return (Boolean) BatchUndoCheckOutBO.getInstance().doExecute(bos);
    }
    
    /**
     * 跃迁对象,执行跃迁事件,并记录跃迁日志
     * @param bo
     * @param vo
     * @return
     * @throws VCIError
     */
    public boolean transferBusinessObject(BusinessObject bo, TransitionVO vo, String releaseStatus) throws VCIError {
        return (Boolean) TransferBO.getInstance().doExecute(bo, vo, releaseStatus);
    }
    
    /**
     * 批量跃迁对象
     * @param bos
     * @param vos
     * @param releaseStatus
     * @return
     * @throws VCIError
     */
    public boolean batchTransferBusinessObject(BusinessObject[] bos,
            TransitionVO[] vos, String[] releaseStatus)
            throws VCIError {
        return (Boolean) BatchTransferBO.getInstance().doExecute(bos, vos, releaseStatus);
    }
    
    /**
     * 变更对象所有者
     * @param bo
     * @param userInfo
     * @return
     * @throws VCIError
     */
    public boolean changeBusinessObjectOwner(BusinessObject bo, UserInfo userInfo) throws VCIError {
        return (Boolean) ChangeBOOwner.getInstance().doExecute(bo, userInfo);
    }
    
    /**
     * 批量变更对象所有者
     * @param bos
     * @param userList
     * @return
     * @throws VCIError
     */
    public boolean batchChangeBusinessObjectOwner(BusinessObject[] bos,
            UserInfo[] userList) throws VCIError {
        return (Boolean) BatchChangeBOOwner.getInstance().doExecute(bos, userList);
    }
    
    public RevisionDataInfo getNextRevisionValueObject(String btName, String nameOid,
            String revisionRule, boolean revInput, String revisionVal) throws VCIError {
        RevisionDataInfo info = null;
        try {
            BOFactoryServices services = BOFactoryServices.getInstance();
            info = services.getNextRevisionValueObject(btName, nameOid, revisionRule, revInput, revisionVal);
        } catch (VCIError e) {
            throw this.getLocalString(e.code, e);
        } catch (Exception e) {
            e.printStackTrace();
            
            throw this.getLocalString("P0010SOF-00010", e);
        } catch (Throwable t) {
            
            t.printStackTrace();
            throw this.getLocalString("P0010SOF-00010", t);
        } finally {
            if (info == null) {
                info = new RevisionDataInfo();
                info.revisionSeq = 0;
                info.revisionVal = "";
            } else {
                if (info.revisionVal == null) {
                    info.revisionVal = "";
                }
            }
        }
        return info;
    }
    
    /**
     * 通过传入的参数和规则计算出下一个版本值
     * @param revisonValue
     * @param revisionSeq
     * @param revisionRule
     * @return
     * @throws VCIError
     */
    public RevisionDataInfo getNextRevisionValueObject(String revisonValue, short revisionSeq, String revisionRule) throws VCIError {
        RevisionDataInfo info = null;
        try {
            BOFactoryServices services = BOFactoryServices.getInstance();
            info = services.getNextRevisionValue(revisonValue, revisionSeq, revisionRule);
        } catch (VCIError e) {
            throw this.getLocalString(e.code, e);
        } catch (Exception e) {
            e.printStackTrace();
            
            throw this.getLocalString("P0010SOF-00010", e);
        } catch (Throwable t) {
            
            t.printStackTrace();
            throw this.getLocalString("P0010SOF-00010", t);
        } finally {
            if (info == null) {
                info = new RevisionDataInfo();
                info.revisionSeq = 0;
                info.revisionVal = "";
            } else {
                if (info.revisionVal == null) {
                    info.revisionVal = "";
                }
            }
        }
        return info;
    }
 
    public VersionDataInfo getNextVersionValue(String btName, String revisionOid,
            String nameOid, int versionType) throws VCIError {
        
        String tableName = OmdHelper.getBTTableName(btName);
        VersionDataInfo info = null;
        try {
            BOFactoryServices services = BOFactoryServices.getInstance();
            info = services.getNextVersionValue(tableName, revisionOid, nameOid, versionType);
        } catch (Exception e) {
            e.printStackTrace();
            
            throw this.getLocalString("P0010SOF-00011", e);
        } catch (Throwable t) {
            
            t.printStackTrace();
            throw this.getLocalString("P0010SOF-00011", t);
        } finally {
            if (info == null) {
                info = new VersionDataInfo();
                info.versionSeq = 0;
                info.versionVal = "";
            } else {
                if (info.versionVal == null) {
                    info.versionVal = "";
                }
            }
        }
        return info;
    }
    
    public String[] getClssficationValue(String sql, AttributeValue[] attrVals) throws VCIError {
        String[] values = null;
        try {
            BOFactoryServices services = BOFactoryServices.getInstance();
            Map<String, String> map = new HashMap<String, String>();
            for (int i = 0; i < attrVals.length; i++) {
                map.put(attrVals[i].attrName, attrVals[i].attrVal);
            }
            values = services.getClssficationValue(sql, map);
        } catch (Exception e) {
            e.printStackTrace();
            
            throw this.getLocalString("P0010SOF-00021", e);
        } catch (Throwable t) {
            
            t.printStackTrace();
            throw this.getLocalString("P0010SOF-00021", t);
        } finally {
            if (values == null) {
                values = new String[0];
            } else {
                for (int i = 0; i < values.length; i++) {
                    if (values[i] == null) {
                        values[i] = "";
                    }
                }
            }
        }
        return values;
    }
    
    public String[][] getSqlQueryResult(String sql, AttributeValue[] attrVals) throws VCIError {
        String[][] values = null;
        try {
            BOFactoryServices services = BOFactoryServices.getInstance();
            Map<String, String> map = new HashMap<String, String>();
            for (int i = 0; i < attrVals.length; i++) {
                map.put(attrVals[i].attrName, attrVals[i].attrVal);
            }
            values = services.getSqlQueryResult(sql, map);
        } catch (Exception e) {
            e.printStackTrace();
            
            throw this.getLocalString("P0010SOF-00021", e);
        } catch (Throwable t) {
            
            t.printStackTrace();
            throw this.getLocalString("P0010SOF-00021", t);
        } finally {
            if (values == null) {
                values = new String[0][0];
            } else {
                for (int i = 0; i < values.length; i++) {
                    if (values[i] == null) {
                        values[i] = new String[0];
                    } else {
                        for (int j = 0; j < values[i].length; j++) {
                            if (values[i][j] == null) {
                                values[i][j] = "";
                            }
                        }
                    }
                }
            }
        }
        return values;
    }
    
    public String[][] getCustomSqlValue(String[] sqls) throws VCIError {
        String[][] values = null;
        try {
            BOFactoryServices services = BOFactoryServices.getInstance();
            values = services.getCustomSqlValue(sqls);
        } catch (Exception e) {
            e.printStackTrace();
            
            throw this.getLocalString("P0010SOF-00021", e);
        } catch (Throwable t) {
            
            t.printStackTrace();
            throw this.getLocalString("P0010SOF-00021", t);
        } finally {
            if (values == null) {
                values = new String[0][0];
            } else {
                for (int i = 0; i < values.length; i++) {
                    if (values[i] == null) {
                        values[i] = new String[0];
                        continue;
                    }
                    for (int j = 0; j < values[i].length; j++) {
                        if (values[i][j] == null) {
                            values[i][j] = "";
                        }
                    }
                }
            }
        }
        return values;
    }
    
//    /**
//     * 日志记录
//     * @param user:操作人
//     * @param module:操作模块
//     * @param ip:操作人所在IP地址
//     * @param operation:操作类型
//     * @param type:对象类型
//     * @param objName:对象名称
//     * @param oid:对象OID
//     * @throws VCIError 
//     */
//    private void recordLog(String user, String module, String ip, String operation, String type, String objName, String oid) throws VCIError {
//        userEntity.setUserName(user);
//        userEntity.setModule(module);
//        userEntity.setIp(ip);
//        
//        //记录日志
//        LogRecordUtil.writeLog(userEntity, operation, type + ":" + objName, LogType.GeneralOperation, oid);
//    }
//    
//    /**
//     * 批量存储log
//     * @param bos
//     * @param ip
//     * @param operation
//     * @throws HibernateException
//     * @throws SQLException
//     */
//    private void batchRecordLog(BusinessObject[] bos, String ip, String operation) throws HibernateException, SQLException {
//        if (bos == null || bos.length < 1) {
//            return;
//        }
//        boolean rs = true;
//        if (rs) {
//            return;
//        }
//        userEntity.setUserName(bos[0].creator);
//        userEntity.setIp(ip);
//        
//        String role = LogRecordUtil.getRoleName(userEntity);
//        if (role == null) {
//            role = "";
//        }
//        ArrayList<String> logList = new ArrayList<String>();
//        for (int i = 0; i < bos.length; i++) {
//            logList.add(LogRecordUtil.getLogSql(userEntity, operation, bos[i].btmName + ":" + bos[i].name, LogType.GeneralOperation, bos[i].oid, role, bos[i].btmName));
//            if ((i + 1) % 200 == 0) {
//                LogRecordUtil.batchSaveLog(logList.toArray(new String[logList.size()]));
//                logList.clear();
//            }
//        }
//        if (bos.length % 200 != 0) {
//            LogRecordUtil.batchSaveLog(logList.toArray(new String[logList.size()]));
//            logList.clear();
//        }
//    }
    
    public String[] getLastReleasedBOId(String nameoid) {
        try {
            BOFactoryServices services = BOFactoryServices.getInstance();
            return services.getLastReleasedBOId(nameoid);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }
    
    public void dealBusinessObjectNullValue(BusinessObject bo) {
        bo.oid = bo.oid == null ? "" : bo.oid;
        bo.revisionid = bo.revisionid == null ? "" : bo.revisionid;
        bo.nameoid = bo.nameoid == null ? "" : bo.nameoid;
        bo.btName = bo.btName == null ? "" : bo.btName;
        bo.creator = bo.creator == null ? "" : bo.creator;
        //bo.createTime = bo.createTime;
        bo.modifier = bo.modifier == null ? "" : bo.modifier;
        //bo.modifyTime = bo.modifyTime;
        
        bo.revisionRule = bo.revisionRule == null ? "" : bo.revisionRule;
        bo.versionRule = bo.versionRule == null ? "" : bo.versionRule;
        bo.revisionValue = bo.revisionValue == null ? "" : bo.revisionValue;
        bo.versionValue = bo.versionValue == null ? "" : bo.versionValue;
        bo.lctId = bo.lctId == null ? "" : bo.lctId;
        bo.lcStatus = bo.lcStatus == null ? "" : bo.lcStatus;
        //bo.ts = bo.ts;
        bo.id = bo.id == null ? "" : bo.id;
        bo.name = bo.name == null ? "" : bo.name;
        bo.description = bo.description == null ? "" : bo.description;
        bo.owner = bo.owner == null ? "" : bo.owner;
//        bo.checkinBy = bo.checkinBy == null ? "" : bo.checkinBy;
//        bo.checkinTime = bo.checkinTime == null ? "" : bo.checkinTime;
//        bo.checkoutBy = bo.checkoutBy == null ? "" : bo.checkoutBy;
//        bo.checkoutTime = bo.checkoutTime == null ? "" : bo.checkoutTime;
        bo.fromVersion = bo.fromVersion == null ? "" : bo.fromVersion;
        if (bo.newAttrValList == null) {
            bo.newAttrValList = new AttributeValue[0];
        }
        for (int i = 0; i < bo.newAttrValList.length; i++) {
            if (bo.newAttrValList[i].attrVal == null) {
                bo.newAttrValList[i].attrVal = "";
            }
        }
        if (bo.hisAttrValList == null) {
            bo.hisAttrValList = new AttributeValue[0];
        }
        for (int i = 0; i < bo.hisAttrValList.length; i++) {
            if (bo.hisAttrValList[i].attrVal == null) {
                bo.hisAttrValList[i].attrVal = "";
            }
        }
    }
}