1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.kpme.pm.classification.web;
17
18 import org.kuali.kpme.core.bo.HrBusinessObject;
19 import org.kuali.kpme.core.bo.HrBusinessObjectMaintainableImpl;
20 import org.kuali.kpme.pm.classification.Classification;
21 import org.kuali.kpme.pm.classification.duty.ClassificationDuty;
22 import org.kuali.kpme.pm.classification.flag.ClassificationFlag;
23 import org.kuali.kpme.pm.classification.qual.ClassificationQualification;
24 import org.kuali.kpme.pm.service.base.PmServiceLocator;
25
26
27 public class ClassificationMaintainableImpl extends HrBusinessObjectMaintainableImpl {
28 private static final long serialVersionUID = 1L;
29
30 @Override
31 public HrBusinessObject getObjectById(String id) {
32 return PmServiceLocator.getClassificationService().getClassificationById(id);
33 }
34 @Override
35 public void customSaveLogic(HrBusinessObject hrObj){
36 Classification aClss = (Classification) hrObj;
37 for(ClassificationQualification aQual : aClss.getQualificationList()) {
38 aQual.setPmPositionClassId(aClss.getPmPositionClassId());
39 aQual.setPmClassificationQualificationId(null);
40 }
41 for(ClassificationDuty aDuty : aClss.getDutyList()) {
42 aDuty.setPmPositionClassId(aClss.getPmPositionClassId());
43 aDuty.setPmDutyId(null);
44 }
45 for(ClassificationFlag aFlag : aClss.getFlagList()) {
46 aFlag.setPmPositionClassId(aClss.getPmPositionClassId());
47 aFlag.setPmFlagId(null);
48 }
49
50 }
51
52
53 }