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  /**
17  
18   * Copyright 2004-2013 The Kuali Foundation
19   *
20   * Licensed under the Educational Community License, Version 2.0 (the "License");
21   * you may not use this file except in compliance with the License.
22   * You may obtain a copy of the License at
23   *
24   * http://www.opensource.org/licenses/ecl2.php
25   *
26   * Unless required by applicable law or agreed to in writing, software
27   * distributed under the License is distributed on an "AS IS" BASIS,
28   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29   * See the License for the specific language governing permissions and
30   * limitations under the License.
31   */
32  package org.kuali.kpme.core.paygrade.web;
33  
34  import java.util.List;
35  import java.util.Map;
36  
37  import org.kuali.kpme.core.api.paygrade.PayGrade;
38  import org.kuali.kpme.core.lookup.KPMELookupableImpl;
39  import org.kuali.kpme.core.paygrade.PayGradeBo;
40  import org.kuali.kpme.core.service.HrServiceLocator;
41  import org.kuali.rice.core.api.mo.ModelObjectUtils;
42  import org.kuali.rice.krad.bo.BusinessObject;
43  import org.kuali.rice.krad.web.form.LookupForm;
44  
45  public class PayGradeLookupableImpl extends KPMELookupableImpl {
46  
47  	private static final long serialVersionUID = 5424446452538063763L;
48      private static final ModelObjectUtils.Transformer<PayGrade, PayGradeBo> toPayGradeBo =
49              new ModelObjectUtils.Transformer<PayGrade, PayGradeBo>() {
50                  public PayGradeBo transform(PayGrade input) {
51                      return PayGradeBo.from(input);
52                  };
53              };
54      @Override
55      public List<? extends BusinessObject> getSearchResults(LookupForm form, Map<String, String> searchCriteria, boolean unbounded) {
56          String payGrade = searchCriteria.get("payGrade");
57          String descr = searchCriteria.get("description");
58          String active = searchCriteria.get("active");
59          String showHistory = searchCriteria.get("history");
60          String salGroup = searchCriteria.get("salGroup");  // KPME-2700
61  
62          return ModelObjectUtils.transform(HrServiceLocator.getPayGradeService().getPayGrades(payGrade, descr, salGroup, active, showHistory), toPayGradeBo);
63      }
64      
65  }