1   
2   
3   
4   
5   
6   
7   
8   
9   
10  
11  
12  
13  
14  
15  
16  package org.kuali.hr.time.calendar.service;
17  
18  import org.kuali.hr.time.calendar.CalendarEntries;
19  import org.kuali.hr.time.calendar.CalendarEntryPeriodType;
20  import org.springframework.cache.annotation.Cacheable;
21  
22  import java.util.Date;
23  import java.util.List;
24  
25  public interface CalendarEntriesService {
26  
27      
28  
29  
30  
31  
32  
33      @Cacheable(value= CalendarEntries.CACHE_NAME, key="'hrCalendarEntriesId=' + #p0")
34  	public CalendarEntries getCalendarEntries(String hrCalendarEntriesId);
35  
36      
37  
38  
39  
40  
41  
42  
43      @Cacheable(value= CalendarEntries.CACHE_NAME, key="'hrCalendarId=' + #p0 + '|' + 'asOfDate=' + #p1")
44  	public CalendarEntries getCurrentCalendarEntriesByCalendarId(String hrCalendarId, Date asOfDate);
45  
46      
47  
48  
49  
50  
51  
52  
53      @Cacheable(value= CalendarEntries.CACHE_NAME, key="'hrCalendarId=' + #p0 + '|' + 'beginDate=' + #p1 + '|' + 'endDate=' + #p2")
54      public CalendarEntries getCalendarEntriesByCalendarIdAndDateRange(String hrCalendarId, Date beginDate, Date endDate);
55  
56      @Cacheable(value= CalendarEntries.CACHE_NAME, key="'hrCalendarId=' + #p0 + '|' + 'endPeriodDate=' + #p1")
57      public CalendarEntries getCalendarEntriesByIdAndPeriodEndDate(String hrCalendarId, Date endPeriodDate);
58  
59      public CalendarEntries getPreviousCalendarEntriesByCalendarId(String hrCalendarId, CalendarEntries pce);
60      public CalendarEntries getNextCalendarEntriesByCalendarId(String hrCalendarId, CalendarEntries pce);
61  
62      
63  
64  
65  
66  
67  
68  
69      @Cacheable(value= CalendarEntries.CACHE_NAME, key="'thresholdDays=' + #p0 + '|' + 'endPeriodDate=' + #p1")
70  	public List<CalendarEntries> getCurrentCalendarEntryNeedsScheduled(int thresholdDays, Date asOfDate);
71  	
72  	public CalendarEntries createNextCalendarEntry(CalendarEntries calendarEntries, CalendarEntryPeriodType type);
73  	
74  	public List<CalendarEntries> getFutureCalendarEntries(String hrCalendarId, Date currentDate, int numberOfEntries);
75  
76      public List<CalendarEntries> getCalendarEntriesEndingBetweenBeginAndEndDate(String hrCalendarId, Date beginDate, Date endDate);
77  
78      @Cacheable(value= CalendarEntries.CACHE_NAME, key="'hrCalendarId=' + #p0")
79      public List<CalendarEntries> getAllCalendarEntriesForCalendarId(String hrCalendarId);
80      @Cacheable(value= CalendarEntries.CACHE_NAME, key="'hrCalendarId=' + #p0 + '|' + 'year=' + #p1")
81      public List<CalendarEntries> getAllCalendarEntriesForCalendarIdAndYear(String hrCalendarId, String year);
82      
83      public List<CalendarEntries> getAllCalendarEntriesForCalendarIdUpToPlanningMonths(String hrCalendarId, String principalId);
84      
85      public List<CalendarEntries> getAllCalendarEntriesForCalendarIdUpToCutOffTime(String hrCalendarId, Date cutOffTime);
86  
87  }