1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.kpme.core.salarygroup.service;
17
18 import org.joda.time.LocalDate;
19 import org.kuali.kpme.core.api.salarygroup.SalaryGroup;
20 import org.kuali.kpme.core.api.salarygroup.service.SalaryGroupService;
21 import org.kuali.kpme.core.salarygroup.SalaryGroupBo;
22 import org.kuali.kpme.core.salarygroup.dao.SalaryGroupDao;
23 import org.kuali.rice.core.api.mo.ModelObjectUtils;
24
25 import java.util.List;
26
27 public class SalaryGroupServiceImpl implements SalaryGroupService {
28
29 private SalaryGroupDao salaryGroupDao;
30 private static final ModelObjectUtils.Transformer<SalaryGroupBo, SalaryGroup> toSalaryGroup =
31 new ModelObjectUtils.Transformer<SalaryGroupBo, SalaryGroup>() {
32 public SalaryGroup transform(SalaryGroupBo input) {
33 return SalaryGroupBo.to(input);
34 };
35 };
36 @Override
37 public SalaryGroup getSalaryGroup(String salGroup, LocalDate asOfDate) {
38 return SalaryGroupBo.to(salaryGroupDao.getSalaryGroup(salGroup, asOfDate));
39 }
40
41 public void setSalaryGroupDao(SalaryGroupDao salaryGroupDao) {
42 this.salaryGroupDao = salaryGroupDao;
43 }
44
45 @Override
46 public SalaryGroup getSalaryGroup(String hrSalGroupId) {
47 return SalaryGroupBo.to(salaryGroupDao.getSalaryGroup(hrSalGroupId));
48 }
49
50 @Override
51 public int getSalGroupCount(String salGroup) {
52 return salaryGroupDao.getSalGroupCount(salGroup);
53 }
54
55 @Override
56 public List<SalaryGroup> getSalaryGroups(String salGroup, String institution, String location, String leavePlan, LocalDate fromEffdt, LocalDate toEffdt, String active, String showHist, String benefitEligible, String leaveEligible, String percentTime) {
57 return ModelObjectUtils.transform(salaryGroupDao.getSalaryGroups(salGroup, institution, location, leavePlan, fromEffdt, toEffdt, active, showHist, benefitEligible, leaveEligible, percentTime), toSalaryGroup);
58 }
59 }