1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.kpme.pm.positionreportsubcat.service;
17
18 import java.util.List;
19
20 import org.joda.time.LocalDate;
21 import org.kuali.kpme.pm.api.positionreportsubcat.PositionReportSubCategory;
22 import org.kuali.kpme.pm.api.positionreportsubcat.service.PositionReportSubCatService;
23 import org.kuali.kpme.pm.positionreportsubcat.PositionReportSubCategoryBo;
24 import org.kuali.kpme.pm.positionreportsubcat.dao.PositionReportSubCatDao;
25 import org.kuali.rice.core.api.mo.ModelObjectUtils;
26
27 public class PositionReportSubCatServiceImpl implements PositionReportSubCatService{
28 private PositionReportSubCatDao positionReportSubCatDao;
29
30 @Override
31 public PositionReportSubCategory getPositionReportSubCatById(
32 String pmPositionReportSubCatId) {
33 return PositionReportSubCategoryBo.to(positionReportSubCatDao.getPositionReportSubCatById(pmPositionReportSubCatId));
34 }
35
36 public PositionReportSubCatDao getPositionReportSubCatDao() {
37 return positionReportSubCatDao;
38 }
39
40 public void setPositionReportSubCatDao(
41 PositionReportSubCatDao positionReportSubCatDao) {
42 this.positionReportSubCatDao = positionReportSubCatDao;
43 }
44
45 public List<PositionReportSubCategory> getPositionReportSubCat(String pstnRptSubCat, LocalDate asOfDate) {
46 return ModelObjectUtils.transform(positionReportSubCatDao.getPositionReportSubCat(pstnRptSubCat, asOfDate),PositionReportSubCategoryBo.toImmutable);
47 }
48
49 @Override
50 public PositionReportSubCategory getActivePositionReportSubCat(
51 String pstnRptSubCat, LocalDate asOfDate) {
52 return PositionReportSubCategoryBo.to(positionReportSubCatDao.getActivePositionReportSubCat(pstnRptSubCat, asOfDate));
53 }
54
55 }