View Javadoc

1   /**
2    * Copyright 2004-2014 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.kpme.tklm.leave.block.dao;
17  
18  import java.util.List;
19  import java.util.Map;
20  
21  import org.joda.time.DateTime;
22  import org.joda.time.LocalDate;
23  import org.kuali.kpme.tklm.leave.block.LeaveBlock;
24  
25  public interface LeaveBlockDao {
26      public LeaveBlock getLeaveBlock(String leaveBlockId);
27      public List<LeaveBlock> getLeaveBlocksForDocumentId(String documentId);
28      public List<LeaveBlock> getLeaveBlocks(String principalId, LocalDate beginDate, LocalDate endDate);
29      public List<LeaveBlock> getLeaveBlocksWithType(String principalId, LocalDate beginDate, LocalDate endDate, String leaveBlockType);
30      public List<LeaveBlock> getLeaveBlocksWithAccrualCategory(String principalId, LocalDate beginDate, LocalDate endDate, String accrualCategory);
31      public List<LeaveBlock> getLeaveBlocksSinceCarryOver(String principalId, Map<String, LeaveBlock> carryOverDates, LocalDate endDate, boolean includeAllAccrualCategories);
32      public Map<String, LeaveBlock> getLastCarryOverBlocks(String principalId, String leaveBlockType, LocalDate asOfDate);
33  
34      public List<LeaveBlock> getLeaveBlocks(String principalId, String leaveBlockType, String requestStatus, LocalDate currentDate);
35      public List<LeaveBlock> getLeaveBlocksForDate(String principalId, LocalDate leaveDate);
36      public List<LeaveBlock> getLeaveBlocks(LocalDate leaveDate, String accrualCategory, String principalId);
37      public List<LeaveBlock> getLeaveBlocks(String principalId, String accrualCategory, LocalDate beginDate, LocalDate endDate);
38      public List<LeaveBlock> getFMLALeaveBlocks(String principalId, String accrualCategory, LocalDate beginDate, LocalDate endDate);
39      public List<LeaveBlock> getNotAccrualGeneratedLeaveBlocksForDate(String principalId, LocalDate leaveDate);
40      /**
41       * Get the leave blocks created from time or leave calendars for given pricipalId and calendar period
42       * @param principalId
43       * @param beginDate
44       * @param endDate
45       * @return
46       */
47      public List<LeaveBlock> getCalendarLeaveBlocks(String principalId, LocalDate beginDate, LocalDate endDate);
48      public void deleteLeaveBlock(String leaveBlockId);
49      public void deleteLeaveBlocksForDocumentId(String documentId);
50      public List<LeaveBlock> getAccrualGeneratedLeaveBlocks(String principalId, LocalDate beginDate, LocalDate endDate);
51      public List<LeaveBlock> getSSTOLeaveBlocks(String principalId, String sstoId, LocalDate accruledDate);
52      public List<LeaveBlock> getABELeaveBlocksSinceTime(String principalId, DateTime lastRanDateTime);
53  
54      public List<LeaveBlock> getLeaveBlocks(String principalId, String leaveBlockType, String requestStatus, LocalDate beginDate, LocalDate endDate);
55  	public List<LeaveBlock> getTimeCalendarLeaveBlocksForTimeBlockLookup(
56  			String documentId, String principalId, String userPrincipalId,
57  			LocalDate fromDate, LocalDate toDate);
58  	public List<LeaveBlock> getLeaveBlocksForLookup(
59  			String documentId, String principalId, String userPrincipalId,
60  			LocalDate fromDate, LocalDate toDate, String leaveBlockType);
61  	
62  }
63