001 /** 002 * Copyright 2004-2013 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 package org.kuali.hr.lm.leaveblock.dao; 017 018 import java.sql.Timestamp; 019 import java.util.Date; 020 import java.util.List; 021 import java.util.Map; 022 023 import org.joda.time.DateTime; 024 import org.kuali.hr.lm.leaveblock.LeaveBlock; 025 026 public interface LeaveBlockDao { 027 public LeaveBlock getLeaveBlock(String leaveBlockId); 028 public List<LeaveBlock> getLeaveBlocksForDocumentId(String documentId); 029 public List<LeaveBlock> getLeaveBlocks(String principalId, Date beginDate, Date endDate); 030 public List<LeaveBlock> getLeaveBlocksWithType(String principalId, Date beginDate, Date endDate, String leaveBlockType); 031 public List<LeaveBlock> getLeaveBlocksWithAccrualCategory(String principalId, Date beginDate, Date endDate, String accrualCategory); 032 public List<LeaveBlock> getLeaveBlocksSinceCarryOver(String principalId, Map<String, LeaveBlock> carryOverDates, DateTime endDate, boolean includeAllAccrualCategories); 033 public Map<String, LeaveBlock> getLastCarryOverBlocks(String principalId, String leaveBlockType, Date asOfDate); 034 035 public List<LeaveBlock> getLeaveBlocks(String principalId, String leaveBlockType, String requestStatus, Date currentDate); 036 public List<LeaveBlock> getLeaveBlocksForDate(String principalId, Date leaveDate); 037 public List<LeaveBlock> getLeaveBlocks(Date leaveDate, String accrualCategory, String principalId); 038 public List<LeaveBlock> getLeaveBlocks(String principalId, String accrualCategory, Date beginDate, Date endDate); 039 public List<LeaveBlock> getFMLALeaveBlocks(String principalId, String accrualCategory, Date beginDate, Date endDate); 040 public List<LeaveBlock> getNotAccrualGeneratedLeaveBlocksForDate(String principalId, Date leaveDate); 041 /** 042 * Get the leave blocks created from time or leave calendars for given pricipalId and calendar period 043 * @param principalId 044 * @param beginDate 045 * @param endDate 046 * @return 047 */ 048 public List<LeaveBlock> getCalendarLeaveBlocks(String principalId, Date beginDate, Date endDate); 049 public void deleteLeaveBlock(String leaveBlockId); 050 public void deleteLeaveBlocksForDocumentId(String documentId); 051 public List<LeaveBlock> getAccrualGeneratedLeaveBlocks(String principalId, Date beginDate, Date endDate); 052 public List<LeaveBlock> getSSTOLeaveBlocks(String principalId, String sstoId, Date accruledDate); 053 public List<LeaveBlock> getABELeaveBlocksSinceTime(String principalId, Timestamp lastRanTime); 054 055 public List<LeaveBlock> getLeaveBlocks(String principalId, String leaveBlockType, String requestStatus, Date beginDate, Date endDate); 056 } 057