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