View Javadoc

1   /**
2    * Copyright 2004-2014 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.kpme.core.salarygroup.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 SalaryGroupLookupableImpl extends KPMELookupableImpl {
28  
29  	private static final long serialVersionUID = 4826886027602440306L;
30  	
31      @Override
32      public List<?> getSearchResults(LookupForm form, Map<String, String> searchCriteria, boolean unbounded) {
33          String hrSalGroup = searchCriteria.get("hrSalGroup");
34          String fromEffdt = TKUtils.getFromDateString(searchCriteria.get("effectiveDate"));
35          String toEffdt = TKUtils.getToDateString(searchCriteria.get("effectiveDate"));
36          String active = searchCriteria.get("active");
37          String showHist = searchCriteria.get("history");
38          String institution = searchCriteria.get("institution");
39          String location = searchCriteria.get("location");
40          String leavePlan = searchCriteria.get("leavePlan");
41          String benefitsEligible = searchCriteria.get("benefitsEligible");
42          String leaveEligible = searchCriteria.get("leaveEligible");
43          String percentTime = searchCriteria.get("percentTime");
44  
45          if (StringUtils.equals(hrSalGroup, "%")) {
46              hrSalGroup = "";
47          }
48          
49          return HrServiceLocator.getSalaryGroupService().getSalaryGroups(hrSalGroup, institution, location, leavePlan, TKUtils.formatDateString(fromEffdt),
50                  TKUtils.formatDateString(toEffdt), active, showHist, benefitsEligible, leaveEligible, percentTime);
51      }
52  
53  }