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.leaveplan.LeavePlan;
22 import org.kuali.hr.time.task.Task;
23 import org.kuali.hr.time.workarea.WorkArea;
24 import org.kuali.rice.krad.service.impl.ModuleServiceBase;
25
26
27 public class KpmeModuleService extends ModuleServiceBase {
28
29 @Override
30 public List<List<String>> listAlternatePrimaryKeyFieldNames(Class businessObjectInterfaceClass) {
31 if (LeavePlan.class.isAssignableFrom(businessObjectInterfaceClass)) {
32 List<List<String>> retList = new ArrayList<List<String>>();
33 List<String> keyList = new ArrayList<String>();
34 keyList.add("leavePlan");
35 keyList.add("effectiveDate");
36 retList.add(keyList);
37 return retList;
38 } else if (Task.class.isAssignableFrom(businessObjectInterfaceClass)) {
39 List<List<String>> retList = new ArrayList<List<String>>();
40 List<String> keyList = new ArrayList<String>();
41 keyList.add("task");
42 keyList.add("effectiveDate");
43 retList.add(keyList);
44 return retList;
45 } else if (WorkArea.class.isAssignableFrom(businessObjectInterfaceClass)) {
46 List<List<String>> retList = new ArrayList<List<String>>();
47 List<String> keyList = new ArrayList<String>();
48 keyList.add("workArea");
49 keyList.add("effectiveDate");
50 retList.add(keyList);
51 return retList;
52 }
53 return super.listAlternatePrimaryKeyFieldNames(businessObjectInterfaceClass);
54 }
55 }