1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.hr.time.principal.service;
17
18 import org.kuali.hr.time.principal.PrincipalHRAttributes;
19 import org.kuali.hr.time.principal.dao.PrincipalHRAttributesDao;
20 import org.kuali.hr.time.service.base.TkServiceLocator;
21
22 import java.util.Date;
23 import java.util.List;
24
25 public class PrincipalHRAttributesServiceImpl implements PrincipalHRAttributesService {
26 private PrincipalHRAttributesDao principalHRAttributesDao;
27
28 public void setPrincipalHRAttributesDao(PrincipalHRAttributesDao principalHRAttributesDao) {
29 this.principalHRAttributesDao = principalHRAttributesDao;
30 }
31
32 public PrincipalHRAttributes getPrincipalCalendar(String principalId, Date asOfDate){
33 PrincipalHRAttributes pc = this.principalHRAttributesDao.getPrincipalCalendar(principalId, asOfDate);
34 if(pc != null) {
35 pc.setCalendar(TkServiceLocator.getCalendarService().getCalendarByGroup(pc.getPayCalendar()));
36 }
37 return pc;
38 }
39
40
41
42
43
44
45 @Override
46 public PrincipalHRAttributes getInactivePrincipalHRAttributes(String principalId, Date asOfDate) {
47 return this.principalHRAttributesDao.getInactivePrincipalHRAttributes(principalId, asOfDate);
48 }
49
50 @Override
51 public PrincipalHRAttributes getPrincipalHRAttributes(String hrPrincipalAttributeId) {
52 return this.principalHRAttributesDao.getPrincipalHRAttributes(hrPrincipalAttributeId);
53 }
54
55 @Override
56 public List<PrincipalHRAttributes> getAllActivePrincipalHrAttributesForPrincipalId(String principalId, Date asOfDate) {
57 return this.principalHRAttributesDao.getAllActivePrincipalHrAttributesForPrincipalId(principalId, asOfDate);
58 }
59 @Override
60 public PrincipalHRAttributes getMaxTimeStampPrincipalHRAttributes(String principalId) {
61 return principalHRAttributesDao.getMaxTimeStampPrincipalHRAttributes(principalId);
62 }
63
64 @Override
65 public List<PrincipalHRAttributes> getAllInActivePrincipalHrAttributesForPrincipalId(String principalId, Date asOfDate) {
66 return this.principalHRAttributesDao.getAllInActivePrincipalHrAttributesForPrincipalId(principalId, asOfDate);
67 }
68 @Override
69 public List<PrincipalHRAttributes> getActivePrincipalHrAttributesForRange(String principalId, Date startDate, Date endDate) {
70 return this.principalHRAttributesDao.getActivePrincipalHrAttributesForRange(principalId, startDate, endDate);
71 }
72 @Override
73 public List<PrincipalHRAttributes> getInactivePrincipalHRAttributesForRange(String principalId, Date startDate, Date endDate) {
74 return this.principalHRAttributesDao.getInactivePrincipalHRAttributesForRange(principalId, startDate, endDate);
75 }
76 @Override
77 public List<PrincipalHRAttributes> getPrincipalHrAtributes(String principalId,
78 java.sql.Date fromEffdt, java.sql.Date toEffdt, String active, String showHistory) {
79 return this.principalHRAttributesDao.getPrincipalHrAtributes(principalId, fromEffdt, toEffdt, active, showHistory);
80 }
81 }