1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.hr.time.earncode.service;
17
18 import org.kuali.hr.time.assignment.Assignment;
19 import org.kuali.hr.time.earncode.EarnCode;
20 import org.springframework.cache.annotation.Cacheable;
21
22 import java.math.BigDecimal;
23 import java.sql.Date;
24 import java.util.List;
25 import java.util.Map;
26
27 public interface EarnCodeService {
28
29
30
31
32
33
34
35 @Cacheable(value=EarnCode.CACHE_NAME, key="'{getEarnCodesForLeaveAndTime}' + 'principalId=' + T(org.kuali.hr.time.util.TKContext).getPrincipalId() + '|' + 'targetId=' + T(org.kuali.hr.time.util.TKContext).getTargetPrincipalId() + '|' + 'a=' + #p0.getTkAssignmentId() + '|' + 'asOfDate=' + #p1 + '|' + 'isLeavePlanningCalendar=' +#p2")
36 public List<EarnCode> getEarnCodesForLeaveAndTime(Assignment a, Date asOfDate, boolean isLeavePlanningCalendar);
37
38
39
40
41
42
43
44 @Cacheable(value=EarnCode.CACHE_NAME, key="'{getEarnCodesForTime}' + 'principalId=' + T(org.kuali.hr.time.util.TKContext).getPrincipalId() + '|' + 'targetId=' + T(org.kuali.hr.time.util.TKContext).getTargetPrincipalId() + '|' + 'a=' + #p0.getTkAssignmentId() + '|' + 'asOfDate=' + #p1 + '|' + 'includeRegularEarnCode=' + false")
45 public List<EarnCode> getEarnCodesForTime(Assignment a, Date asOfDate);
46
47
48
49
50
51
52
53 @Cacheable(value=EarnCode.CACHE_NAME, key="'{getEarnCodesForTime}' + 'principalId=' + T(org.kuali.hr.time.util.TKContext).getPrincipalId() + '|' + 'targetId=' + T(org.kuali.hr.time.util.TKContext).getTargetPrincipalId() + '|' + 'a=' + #p0.getTkAssignmentId() + '|' + 'asOfDate=' + #p1 + '|' + 'includeRegularEarnCode=' + #p2")
54 public List<EarnCode> getEarnCodesForTime(Assignment a, Date asOfDate, boolean includeRegularEarnCode);
55
56
57
58
59
60
61
62
63 @Cacheable(value=EarnCode.CACHE_NAME, key="'{getEarnCodesForLeave}' + 'principalId=' + T(org.kuali.hr.time.util.TKContext).getPrincipalId() + '|' + 'targetId=' + T(org.kuali.hr.time.util.TKContext).getTargetPrincipalId() + '|' + 'a=' + #p0.getTkAssignmentId() + '|' + 'asOfDate=' + #p1 + '|' + 'isLeavePlanningCalendar=' +#p2")
64 public List<EarnCode> getEarnCodesForLeave(Assignment a, Date asOfDate, boolean isLeavePlanningCalendar);
65
66
67
68
69
70
71
72
73 @Cacheable(value=EarnCode.CACHE_NAME, key="'principalId=' + #p0 + '|' + 'asOfDate=' + #p1 + '|' + 'isLeavePlanningCalendar=' +#p2")
74 public List<EarnCode> getEarnCodesForPrincipal(String principalId, Date asOfDate, boolean isLeavePlanningCalendar);
75
76
77
78
79
80
81
82 @Cacheable(value=EarnCode.CACHE_NAME, key="'earnCode=' + #p0 + '|' + 'asOfDate=' + #p1")
83 public EarnCode getEarnCode(String earnCode, Date asOfDate);
84
85
86
87
88
89
90
91 @Cacheable(value=EarnCode.CACHE_NAME, key="'{getEarnCodeType}' + 'earnCode=' + #p0 + '|' + 'asOfDate=' + #p1")
92 String getEarnCodeType(String earnCode, Date asOfDate);
93
94
95
96
97
98
99 @Cacheable(value=EarnCode.CACHE_NAME, key="'earnCodeId=' + #p0")
100 public EarnCode getEarnCodeById(String earnCodeId);
101
102
103
104
105
106
107 @Cacheable(value=EarnCode.CACHE_NAME, key="'{getOvertimeEarnCodes}' + 'asOfDate=' + #p0")
108 public List<EarnCode> getOvertimeEarnCodes(Date asOfDate);
109
110
111
112
113
114
115
116 @Cacheable(value=EarnCode.CACHE_NAME, key="'{getOvertimeEarnCodesStrs}' + 'asOfDate=' + #p0")
117 public List<String> getOvertimeEarnCodesStrs(Date asOfDate);
118
119
120
121
122
123
124 public int getEarnCodeCount(String earnCode);
125
126
127
128
129
130
131
132 public int getNewerEarnCodeCount(String earnCode, Date effdt);
133
134
135
136
137
138
139
140 public BigDecimal roundHrsWithEarnCode(BigDecimal hours, EarnCode earnCode);
141
142
143
144
145
146
147 @Cacheable(value= EarnCode.CACHE_NAME, key="'{getEarnCodesForDisplay}' + 'principalId=' + #p0 + '|' + 'isLeavePlanningCalendar=' +#p1")
148 public Map<String, String> getEarnCodesForDisplay(String principalId, boolean isLeavePlanningCalendar);
149
150
151
152
153
154
155 @Cacheable(value= EarnCode.CACHE_NAME, key="'{getEarnCodesForDisplayWithEffectiveDate}' + 'principalId=' + #p0 + '|' + 'asOfDate=' + #p1 + '|' + 'isLeavePlanningCalendar=' +#p2")
156 public Map<String, String> getEarnCodesForDisplayWithEffectiveDate(String principalId, Date asOfDate, boolean isLeavePlanningCalendar);
157
158 List<EarnCode> getEarnCodes(String earnCode, String ovtEarnCode, String leavePlan, String accrualCategory, String descr, Date fromEffdt, Date toEffdt, String active, String showHist);
159 }