View Javadoc

1   /**
2    * Copyright 2004-2013 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.hr.time.principal.service;
17  
18  import java.util.Date;
19  import java.util.List;
20  import org.kuali.hr.time.principal.PrincipalHRAttributes;
21  import org.springframework.cache.annotation.Cacheable;
22  
23  public interface PrincipalHRAttributesService {
24  	/**
25  	 * Fetch PrincipalCalendar object at a particular date
26  	 * @param principalId
27  	 * @param asOfDate
28  	 * @return
29  	 */
30      @Cacheable(value= PrincipalHRAttributes.CACHE_NAME, key="'principalId=' + #p0 + '|' + 'asOfDate=' + #p1")
31  	public PrincipalHRAttributes getPrincipalCalendar(String principalId, Date asOfDate);
32  	
33  	/**
34  	 * Get a list of active employees based on pay calendar and as of a particular date 
35  	 * @param payCalendarName
36  	 * @param asOfDate
37  	 * @return
38  	 */
39      @Cacheable(value= PrincipalHRAttributes.CACHE_NAME, key="'payCalendarName=' + #p0 + '|' + 'asOfDate=' + #p1")
40      public List<PrincipalHRAttributes> getActiveEmployeesForPayCalendar(String payCalendarName, Date asOfDate);
41      
42  	/**
43  	 * Get a list of active employees based on leave calendar and as of a particular date 
44  	 * @param leaveCalendarName
45  	 * @param asOfDate
46  	 * @return
47  	 */
48      @Cacheable(value= PrincipalHRAttributes.CACHE_NAME, key="'leaveCalendarName=' + #p0 + '|' + 'asOfDate=' + #p1")
49      public List<PrincipalHRAttributes> getActiveEmployeesForLeaveCalendar(String leaveCalendarName, Date asOfDate);
50      
51      /**
52       * Get a list of unique principal ids that match given criteria, used by leave approval and leave request approval pages
53       * @param leaveCalendarName
54       * @param pidList
55       * @param asOfDate
56       * @return
57       */
58      @Cacheable(value= PrincipalHRAttributes.CACHE_NAME, key="'leaveCalendarName=' + #p0 + '|' + 'asOfDate=' + #p1")
59      public List<String> getActiveEmployeesIdForLeaveCalendarAndIdList(String leaveCalendarName, List<String> pidList, Date asOfDate);
60  	
61      /**
62       * Get a list of unique principal ids that match given criteria, used by Time approval pages
63       * @param timeCalendarName
64       * @param pidList
65       * @param asOfDate
66       * @return
67       */
68      @Cacheable(value= PrincipalHRAttributes.CACHE_NAME, key="'timeCalendarName=' + #p0 + '|' + 'asOfDate=' + #p1")
69      public List<String> getActiveEmployeesIdForTimeCalendarAndIdList(String timeCalendarName, List<String> pidList, Date asOfDate);
70      
71      /**
72  	 * KPME-1250 Kagata
73  	 * Get a list of active employees based on leave plan and as of a particular date 
74  	 * @param leavePlan
75  	 * @param asOfDate
76  	 * @return
77  	 */
78      @Cacheable(value= PrincipalHRAttributes.CACHE_NAME, key="'leavePlan=' + #p0 + '|' + 'asOfDate=' + #p1")
79      public List<PrincipalHRAttributes> getActiveEmployeesForLeavePlan(String leavePlan, Date asOfDate);
80      
81  	/**
82  	 * Fetch inactive PrincipalHRAttributes object at a particular date
83  	 * @param principalId
84  	 * @param asOfDate
85  	 * @return
86  	 */
87      public PrincipalHRAttributes getInactivePrincipalHRAttributes(String principalId, Date asOfDate);
88  	/**
89  	 * Fetch PrincipalHRAttributes object with given id
90  	 * @param hrPrincipalAttributeId
91  	 * @return
92  	 */
93      public PrincipalHRAttributes getPrincipalHRAttributes(String hrPrincipalAttributeId);
94      
95      public List<PrincipalHRAttributes> getAllActivePrincipalHrAttributesForPrincipalId(String principalId, Date asOfDate);
96      
97      public List<PrincipalHRAttributes> getAllInActivePrincipalHrAttributesForPrincipalId(String principalId, Date asOfDate);
98      
99      public PrincipalHRAttributes getMaxTimeStampPrincipalHRAttributes(String principalId);
100     
101     /*
102      * Fetch list of PrincipalHRAttributes that become active for given principalId and date range
103      */
104     public List<PrincipalHRAttributes> getActivePrincipalHrAttributesForRange(String principalId, Date startDate, Date endDate);
105     /*
106      * Fetch list of PrincipalHRAttributes that become inactive for given principalId and date range
107      */
108     public List<PrincipalHRAttributes> getInactivePrincipalHRAttributesForRange(String principalId, Date startDate, Date endDate);
109     /**
110      * Fetch list of PrincipalHRAttributes using given parameters
111      *
112      * @param principalId
113      * @param leavePlan
114      *@param fromEffdt
115      * @param toEffdt
116      * @param active
117      * @param showHistory     @return
118      */
119     public List<PrincipalHRAttributes> getPrincipalHrAtributes(String principalId, String leavePlan, java.sql.Date fromEffdt, java.sql.Date toEffdt, String active, String showHistory);
120     /**
121      * Get List of all active pay calendars
122      * @return
123      */
124     public List<String> getUniqueTimePayGroups();
125 }