1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.kpme.core.departmentaffiliation.service;
17
18 import java.util.List;
19
20 import org.joda.time.LocalDate;
21 import org.kuali.kpme.core.api.departmentaffiliation.DepartmentAffiliation;
22 import org.kuali.kpme.core.api.departmentaffiliation.service.DepartmentAffiliationService;
23 import org.kuali.kpme.core.departmentaffiliation.DepartmentAffiliationBo;
24 import org.kuali.kpme.core.departmentaffiliation.dao.DepartmentAffiliationDao;
25 import org.kuali.rice.core.api.mo.ModelObjectUtils;
26
27 public class DepartmentAffiliationServiceImpl implements DepartmentAffiliationService {
28
29 private DepartmentAffiliationDao departmentAffiliationDao;
30
31
32
33
34 public DepartmentAffiliationDao getDepartmentAffiliationDao() {
35 return departmentAffiliationDao;
36 }
37
38
39
40
41 public void setDepartmentAffiliationDao(
42 DepartmentAffiliationDao departmentAffiliationDao) {
43 this.departmentAffiliationDao = departmentAffiliationDao;
44 }
45
46 @Override
47 public DepartmentAffiliation getDepartmentAffiliationById(
48 String hrDeptAfflId) {
49 return DepartmentAffiliationBo.to(this.departmentAffiliationDao.getDepartmentAffiliationById(hrDeptAfflId));
50 }
51
52 @Override
53 public DepartmentAffiliation getDepartmentAffiliationByType(String deptAfflType) {
54 return DepartmentAffiliationBo.to(this.departmentAffiliationDao.getDepartmentAffiliationByType(deptAfflType));
55 }
56
57 @Override
58 public List<DepartmentAffiliation> getDepartmentAffiliationList(String deptAfflType, LocalDate asOfDate) {
59 return ModelObjectUtils.transform(this.departmentAffiliationDao.getDepartmentAffiliationList(deptAfflType, asOfDate),DepartmentAffiliationBo.toImmutable);
60 }
61
62 @Override
63 public List<DepartmentAffiliation> getAllActiveAffiliations() {
64 return ModelObjectUtils.transform(this.departmentAffiliationDao.getAllActiveAffiliations(),DepartmentAffiliationBo.toImmutable);
65 }
66
67
68 @Override
69 public DepartmentAffiliation getPrimaryAffiliation() {
70 return DepartmentAffiliationBo.to(this.departmentAffiliationDao.getPrimaryAffiliation());
71 }
72 }