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.workflow.service;
17  
18  import java.util.List;
19  
20  import org.joda.time.DateTime;
21  import org.kuali.kpme.tklm.leave.workflow.LeaveCalendarDocumentHeader;
22  import org.kuali.kpme.tklm.leave.workflow.dao.LeaveCalendarDocumentHeaderDao;
23  
24  public class LeaveCalendarDocumentHeaderServiceImpl implements LeaveCalendarDocumentHeaderService {
25  
26      private LeaveCalendarDocumentHeaderDao leaveCalendarDocumentHeaderDao;
27  
28      public LeaveCalendarDocumentHeaderDao getLeaveCalendarDocumentHeaderDao() {
29          return leaveCalendarDocumentHeaderDao;
30      }
31  
32      public void setLeaveCalendarDocumentHeaderDao(LeaveCalendarDocumentHeaderDao leaveCalendarDocumentHeaderDao) {
33          this.leaveCalendarDocumentHeaderDao = leaveCalendarDocumentHeaderDao;
34      }
35  
36      @Override
37      public LeaveCalendarDocumentHeader getDocumentHeader(String documentId) {
38          return leaveCalendarDocumentHeaderDao.getLeaveCalendarDocumentHeader(documentId);
39      }
40  
41      @Override
42      public LeaveCalendarDocumentHeader getDocumentHeader(String principalId, DateTime beginDate, DateTime endDate) {
43          return leaveCalendarDocumentHeaderDao.getLeaveCalendarDocumentHeader(principalId,  beginDate,  endDate);
44      }
45  
46      @Override
47      public void saveOrUpdate(LeaveCalendarDocumentHeader leaveCalendarDocumentHeader) {
48          leaveCalendarDocumentHeaderDao.saveOrUpdate(leaveCalendarDocumentHeader);
49      }
50  	
51  	@Override
52      public List<LeaveCalendarDocumentHeader> getDocumentHeaders(DateTime beginDate, DateTime endDate) {
53          return leaveCalendarDocumentHeaderDao.getDocumentHeaders(beginDate, endDate);
54      }
55  	
56  	@Override
57  	public LeaveCalendarDocumentHeader getMaxEndDateApprovedLeaveCalendar(String principalId) {
58  		return leaveCalendarDocumentHeaderDao.getMaxEndDateApprovedLeaveCalendar(principalId);
59  	}
60  
61  	@Override
62  	public LeaveCalendarDocumentHeader getMinBeginDatePendingLeaveCalendar(String principalId) {
63  		return leaveCalendarDocumentHeaderDao.getMinBeginDatePendingLeaveCalendar(principalId);
64  	}
65  	
66  	@Override
67  	public List<LeaveCalendarDocumentHeader> getAllDocumentHeadersForPricipalId(String principalId){
68  		return leaveCalendarDocumentHeaderDao.getAllDocumentHeadersForPricipalId(principalId);
69  	}
70  	
71  	@Override
72  	public List<LeaveCalendarDocumentHeader> getSubmissionDelinquentDocumentHeaders(String principalId, DateTime beforeDate) {
73  		return leaveCalendarDocumentHeaderDao.getSubmissionDelinquentDocumentHeaders(principalId, beforeDate);
74  	}
75  	
76  	@Override
77  	public List<LeaveCalendarDocumentHeader> getApprovalDelinquentDocumentHeaders(String principalId){
78  		return leaveCalendarDocumentHeaderDao.getApprovalDelinquentDocumentHeaders(principalId);
79  	}
80  
81      public void deleteLeaveCalendarHeader(String documentId){
82          leaveCalendarDocumentHeaderDao.deleteLeaveCalendarHeader(documentId);
83      }
84      @Override
85      public List<LeaveCalendarDocumentHeader> getAllDocumentHeadersInRangeForPricipalId(String principalId, DateTime beginDate, DateTime endDate) {
86      	return leaveCalendarDocumentHeaderDao.getAllDocumentHeadersInRangeForPricipalId(principalId, beginDate, endDate);
87      }
88  }