1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.kpme.core.job.service;
17
18 import java.math.BigDecimal;
19 import java.util.List;
20
21 import org.joda.time.LocalDate;
22 import org.kuali.kpme.core.assignment.Assignment;
23 import org.kuali.kpme.core.block.CalendarBlockPermissions;
24 import org.kuali.kpme.core.job.Job;
25 import org.springframework.cache.annotation.CacheEvict;
26 import org.springframework.cache.annotation.Cacheable;
27
28 public interface JobService {
29
30
31
32
33
34 @CacheEvict(value={Job.CACHE_NAME, Assignment.CACHE_NAME, CalendarBlockPermissions.CACHE_NAME}, allEntries = true)
35 public void saveOrUpdate(Job job);
36
37
38
39
40
41 @CacheEvict(value={Job.CACHE_NAME, Assignment.CACHE_NAME, CalendarBlockPermissions.CACHE_NAME}, allEntries = true)
42 public void saveOrUpdate(List<Job> jobList);
43
44
45
46
47
48
49
50
51
52
53
54
55
56 @Cacheable(value= Job.CACHE_NAME, key="'principalId=' + #p0 + '|' + 'asOfDate=' + #p1")
57 public List<Job> getJobs(String principalId, LocalDate asOfDate);
58
59
60
61
62 @Cacheable(value= Job.CACHE_NAME, key="'principalId=' + #p0 + '|' + 'jobNumber=' + #p1 + '|' + 'asOfDate=' + #p2")
63 public Job getJob(String principalId, Long jobNumber, LocalDate asOfDate);
64
65
66
67
68 @Cacheable(value= Job.CACHE_NAME, key="'principalId=' + #p0 + '|' + 'jobNumber=' + #p1 + '|' + 'asOfDate=' + #p2 + '|' + 'chkDetails=' + #p3")
69 public Job getJob(String principalId, Long jobNumber, LocalDate asOfDate, boolean chkDetails);
70
71
72
73
74
75
76
77
78
79 @Cacheable(value= Job.CACHE_NAME, key="'{getPrimaryJob}' + 'principalId=' + #p0 + '|' + 'asOfDate=' + #p1")
80 public Job getPrimaryJob(String principalId, LocalDate asOfDate);
81
82
83
84
85
86
87
88 @Cacheable(value= Job.CACHE_NAME, key="'hrPayType=' + #p0 + '|' + 'asOfDate=' + #p1")
89 public List<Job> getActiveJobsForPayType(String hrPayType, LocalDate asOfDate);
90
91
92
93
94
95
96 @Cacheable(value= Job.CACHE_NAME, key="'hrJobId=' + #p0")
97 public Job getJob(String hrJobId);
98
99
100
101
102
103
104 @Cacheable(value= Job.CACHE_NAME, key="'principalId=' + #p0")
105 public Job getMaxJob(String principalId);
106
107 List<Job> getJobs(String userPrincipalId, String principalId, String firstName, String lastName, String jobNumber,
108 String dept, String positionNbr, String payType,
109 LocalDate fromEffdt, LocalDate toEffdt, String active, String showHistory);
110
111 public int getJobCount(String principalId, Long jobNumber, String dept);
112
113
114
115
116
117
118
119 public List<Job> getActiveLeaveJobs(String principalId, LocalDate asOfDate);
120
121
122
123
124
125
126 public BigDecimal getFteSumForJobs(List<Job> jobs);
127
128
129
130
131
132
133 public BigDecimal getFteSumForAllActiveLeaveEligibleJobs(String PrincipalId, LocalDate asOfDate);
134
135
136
137
138
139 public BigDecimal getStandardHoursSumForJobs(List<Job> jobs);
140
141
142
143
144
145
146
147 public List<Job> getAllActiveLeaveJobs(String principalId, LocalDate asOfDate);
148
149 public List<Job> getInactiveLeaveJobs(Long jobNumber, LocalDate endDate);
150
151 public List<Job> getAllInActiveLeaveJobsInRange(String principalId, LocalDate endDate);
152
153
154
155
156 public Job getMaxTimestampJob(String principalId);
157
158
159
160
161
162
163
164
165
166 @Cacheable(value= Job.CACHE_NAME, key="'positionNumber=' + #p0 + '|' + 'asOfDate=' + #p1")
167 public List<String> getPrincipalIdsInPosition(String positionNbr, LocalDate asOfDate);
168
169 }