1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.hr.core.service;
17
18 import java.util.ArrayList;
19 import java.util.List;
20
21 import org.kuali.hr.lm.accrual.AccrualCategory;
22 import org.kuali.hr.lm.leaveplan.LeavePlan;
23 import org.kuali.hr.paygrade.PayGrade;
24 import org.kuali.hr.time.department.Department;
25 import org.kuali.hr.time.position.Position;
26 import org.kuali.hr.time.salgroup.SalGroup;
27 import org.kuali.hr.time.task.Task;
28 import org.kuali.hr.time.workarea.WorkArea;
29 import org.kuali.rice.krad.service.impl.ModuleServiceBase;
30
31
32 public class KpmeModuleService extends ModuleServiceBase {
33
34 @Override
35 public List<List<String>> listAlternatePrimaryKeyFieldNames(Class businessObjectInterfaceClass) {
36 if (LeavePlan.class.isAssignableFrom(businessObjectInterfaceClass)) {
37 List<List<String>> retList = new ArrayList<List<String>>();
38 List<String> keyList = new ArrayList<String>();
39 keyList.add("leavePlan");
40 keyList.add("effectiveDate");
41 retList.add(keyList);
42 return retList;
43 } else if (Task.class.isAssignableFrom(businessObjectInterfaceClass)) {
44 List<List<String>> retList = new ArrayList<List<String>>();
45 List<String> keyList = new ArrayList<String>();
46 keyList.add("task");
47 keyList.add("effectiveDate");
48 retList.add(keyList);
49 return retList;
50 } else if (WorkArea.class.isAssignableFrom(businessObjectInterfaceClass)) {
51 List<List<String>> retList = new ArrayList<List<String>>();
52 List<String> keyList = new ArrayList<String>();
53 keyList.add("workArea");
54 keyList.add("effectiveDate");
55 retList.add(keyList);
56 return retList;
57 } else if (PayGrade.class.isAssignableFrom(businessObjectInterfaceClass)) {
58 List<List<String>> retList = new ArrayList<List<String>>();
59 List<String> keyList = new ArrayList<String>();
60 keyList.add("payGrade");
61 keyList.add("salGroup");
62 keyList.add("effectiveDate");
63 retList.add(keyList);
64 return retList;
65 } else if (SalGroup.class.isAssignableFrom(businessObjectInterfaceClass)) {
66 List<List<String>> retList = new ArrayList<List<String>>();
67 List<String> keyList = new ArrayList<String>();
68 keyList.add("hrSalGroup");
69 keyList.add("effectiveDate");
70 retList.add(keyList);
71 return retList;
72 } else if (Department.class.isAssignableFrom(businessObjectInterfaceClass)) {
73 List<List<String>> retList = new ArrayList<List<String>>();
74 List<String> keyList = new ArrayList<String>();
75 keyList.add("dept");
76 keyList.add("effectiveDate");
77 retList.add(keyList);
78 return retList;
79 } else if (Position.class.isAssignableFrom(businessObjectInterfaceClass)) {
80 List<List<String>> retList = new ArrayList<List<String>>();
81 List<String> keyList = new ArrayList<String>();
82 keyList.add("positionNumber");
83 keyList.add("effectiveDate");
84 retList.add(keyList);
85 return retList;
86 } else if (AccrualCategory.class.isAssignableFrom(businessObjectInterfaceClass)) {
87 List<List<String>> retList = new ArrayList<List<String>>();
88 List<String> keyList = new ArrayList<String>();
89 keyList.add("accrualCategory");
90 keyList.add("effectiveDate");
91 retList.add(keyList);
92 return retList;
93 }
94 return super.listAlternatePrimaryKeyFieldNames(businessObjectInterfaceClass);
95 }
96 }