1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.hr.time.assignment.service;
17
18 import org.kuali.hr.time.assignment.Assignment;
19 import org.kuali.hr.time.assignment.AssignmentDescriptionKey;
20 import org.kuali.hr.time.calendar.CalendarEntries;
21 import org.kuali.hr.time.timesheet.TimesheetDocument;
22 import org.springframework.cache.annotation.Cacheable;
23
24 import java.sql.Date;
25 import java.util.List;
26 import java.util.Map;
27
28 public interface AssignmentService {
29
30
31
32
33
34
35 @Cacheable(value= Assignment.CACHE_NAME, key="'principalId=' + #p0 + '|' + 'asOfDate=' + #p1")
36 public List<Assignment> getAssignments(String principalId, Date asOfDate);
37
38
39
40
41
42
43 public Assignment getAssignment(TimesheetDocument timesheetDocument, String assignmentKey);
44
45
46
47
48
49 @Cacheable(value= Assignment.CACHE_NAME, key="'tkAssignmentId=' + #p0")
50 public Assignment getAssignment(String tkAssignmentId);
51
52
53
54
55
56 public AssignmentDescriptionKey getAssignmentDescriptionKey(String assignmentDesc);
57
58
59
60
61
62
63 public Map<String,String> getAssignmentDescriptions(TimesheetDocument td, boolean clockOnlyAssignments);
64
65
66
67
68
69 public Map<String,String> getAssignmentDescriptions(Assignment assignment);
70
71
72
73
74
75
76 @Cacheable(value= Assignment.CACHE_NAME, key="'workArea=' + #p0 + '|' + 'asOfDate=' + #p1")
77 public List<Assignment> getActiveAssignmentsForWorkArea(Long workArea, Date asOfDate);
78
79
80
81
82
83
84
85
86 @Cacheable(value= Assignment.CACHE_NAME, key="'asOfDate=' + #p0")
87 public List<Assignment> getActiveAssignments(Date asOfDate);
88
89
90
91
92
93
94
95 public Assignment getAssignment(AssignmentDescriptionKey key, Date asOfDate);
96
97
98
99
100
101
102
103
104
105 public Assignment getAssignment(String principalId, AssignmentDescriptionKey key, Date asOfDate);
106
107
108
109
110
111
112
113 public List<Assignment> getAssignmentsByPayEntry(String principalId, CalendarEntries payCalendarEntry);
114
115
116
117
118
119
120
121
122
123 @Cacheable(value= Assignment.CACHE_NAME, key="'principalId=' + #p0 + '|' + 'jobNumber=' + #p1 + '|' + 'asOfDate=' + #p2")
124 public List<Assignment> getActiveAssignmentsForJob(String principalId, Long jobNumber, Date asOfDate);
125
126 List<Assignment> searchAssignments(Date fromEffdt, Date toEffdt, String principalId, String jobNumber,
127 String dept, String workArea, String active, String showHistory);
128
129 public Assignment getMaxTimestampAssignment(String principalId);
130 }