1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.kpme.core.position.web;
17
18 import java.util.List;
19 import java.util.Map;
20
21 import org.apache.commons.lang.StringUtils;
22 import org.kuali.kpme.core.lookup.KPMELookupableImpl;
23 import org.kuali.kpme.core.service.HrServiceLocator;
24 import org.kuali.kpme.core.util.TKUtils;
25 import org.kuali.rice.krad.web.form.LookupForm;
26
27 public class PositionBaseLookupableImpl extends KPMELookupableImpl {
28
29 private static final long serialVersionUID = -131891943631454679L;
30
31 @Override
32 protected List<?> getSearchResults(LookupForm form, Map<String, String> searchCriteria, boolean unbounded) {
33 String positionNum = searchCriteria.get("positionNumber");
34 String description = searchCriteria.get("description");
35 String fromEffdt = TKUtils.getFromDateString(searchCriteria.get("effectiveDate"));
36 String toEffdt = TKUtils.getToDateString(searchCriteria.get("effectiveDate"));
37 String active = searchCriteria.get("active");
38 String showHist = searchCriteria.get("history");
39
40 if (StringUtils.equals(positionNum, "%")) {
41 positionNum = "";
42 }
43
44 return HrServiceLocator.getPositionService().getPositions(positionNum, description, TKUtils.formatDateString(fromEffdt),
45 TKUtils.formatDateString(toEffdt), active, showHist);
46 }
47
48 }