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.kpme.tklm.time.workflow.service;
17  
18  import java.util.List;
19  
20  import org.joda.time.DateTime;
21  import org.kuali.kpme.tklm.time.workflow.TimesheetDocumentHeader;
22  import org.kuali.kpme.tklm.time.workflow.dao.TimesheetDocumentHeaderDao;
23  
24  public class TimesheetDocumentHeaderServiceImpl implements TimesheetDocumentHeaderService {
25  
26      private TimesheetDocumentHeaderDao documentHeaderDao;
27  
28      public void setTimesheetDocumentHeaderDao(TimesheetDocumentHeaderDao documentHeaderDao) {
29          this.documentHeaderDao = documentHeaderDao;
30      }
31  
32      @Override
33      public TimesheetDocumentHeader getDocumentHeader(String documentId) {
34          return documentHeaderDao.getTimesheetDocumentHeader(documentId);
35      }
36  
37      @Override
38      public void saveOrUpdate(TimesheetDocumentHeader documentHeader) {
39          documentHeaderDao.saveOrUpdate(documentHeader);
40      }
41  
42      @Override
43      public TimesheetDocumentHeader getDocumentHeader(String principalId, DateTime payBeginDate, DateTime payEndDate) {
44          return documentHeaderDao.getTimesheetDocumentHeader(principalId, payBeginDate, payEndDate);
45      }
46  
47      public TimesheetDocumentHeader getPreviousDocumentHeader(String principalId, DateTime payBeginDate) {
48          return documentHeaderDao.getPreviousDocumentHeader(principalId, payBeginDate);
49      }
50      
51      public TimesheetDocumentHeader getNextDocumentHeader(String principalId, DateTime payEndDate) {
52          return documentHeaderDao.getNextDocumentHeader(principalId, payEndDate);
53      }
54      
55      @Override
56      public List<TimesheetDocumentHeader> getDocumentHeaders(DateTime payBeginDate, DateTime payEndDate) {
57          return documentHeaderDao.getDocumentHeaders(payBeginDate, payEndDate);
58      }
59  
60  	@Override
61  	public void deleteTimesheetHeader(String documentId) {
62  		documentHeaderDao.deleteTimesheetHeader(documentId);
63  
64  	}
65  	
66  	@Override
67  	public List<TimesheetDocumentHeader> getDocumentHeadersForPrincipalId(String principalId) {
68  		return documentHeaderDao.getDocumentHeadersForPrincipalId(principalId);
69  	}
70  	
71  	public List<TimesheetDocumentHeader> getDocumentHeadersForYear(String principalId, String year) {
72  		return documentHeaderDao.getDocumentHeadersForYear(principalId, year);
73  	}
74  	
75  	public TimesheetDocumentHeader getDocumentHeaderForDate(String principalId, DateTime asOfDate) {
76  		return documentHeaderDao.getDocumentHeaderForDate(principalId, asOfDate);
77  	}
78  
79  }