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.time.timeblock.dao;
17  
18  import java.util.List;
19  
20  import org.joda.time.DateTime;
21  import org.joda.time.LocalDate;
22  import org.kuali.kpme.core.assignment.Assignment;
23  import org.kuali.kpme.tklm.time.timeblock.TimeBlock;
24  
25  public interface TimeBlockDao {
26  
27  	public void saveOrUpdate(TimeBlock timeBlock);
28  
29  	public void saveOrUpdate(List<TimeBlock> timeBlockList);
30  
31  	public void deleteTimeBlock(TimeBlock timeBlock);
32  
33  	public TimeBlock getTimeBlock(String timeBlockId);
34  	
35  	public List<TimeBlock> getTimeBlocks(String documentId);
36  	
37  	public List<TimeBlock> getTimeBlocksForAssignment(Assignment assign);
38  	
39  	public void deleteTimeBlocksAssociatedWithDocumentId(String documentId);
40  	
41  	/*
42  	 * Get all the time blocks with the given Clock Log id as the clockLogEndId
43  	 * @param tkClockLogId
44  	 * @return List<TimeBlock>	 * 
45  	 */
46  	public List<TimeBlock> getTimeBlocksForClockLogEndId(String tkClockLogId);
47  	/*
48  	 * Get all the time blocks with the given Clock Log id as the clockLogBeginId
49  	 * @param tkClockLogId
50  	 * @return List<TimeBlock>	 * 
51  	 */
52  	public List<TimeBlock> getTimeBlocksForClockLogBeginId(String tkClockLogId);
53  	
54  	public List<TimeBlock> getLatestEndTimestampForEarnCode(String earnCode);
55  
56      List<TimeBlock> getOvernightTimeBlocks(String clockLogEndId);
57      
58      public List<TimeBlock> getTimeBlocksWithEarnCode(String earnCode, DateTime effDate);
59  
60  	public List<TimeBlock> getTimeBlocksForLookup(String documentId,
61  			String principalId, String userPrincipalId, LocalDate fromDate,
62  			LocalDate toDate);
63  }