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.time.clocklog.dao; 17 18 import java.util.List; 19 20 import org.kuali.hr.time.calendar.CalendarEntries; 21 import org.kuali.hr.time.clocklog.ClockLog; 22 23 public interface ClockLogDao { 24 25 /** 26 * Save or update ClockLog passed in 27 * @param clockLog 28 */ 29 public void saveOrUpdate(ClockLog clockLog); 30 /** 31 * Save or update List of ClockLogs passed in 32 * @param clockLogList 33 */ 34 public void saveOrUpdate(List<ClockLog> clockLogList); 35 /** 36 * Get last ClockLog for a given principalId 37 * @param principalId 38 * @return 39 */ 40 public ClockLog getLastClockLog(String principalId); 41 /** 42 * Get last ClockLog for a given principalId and clockAction 43 * @param principalId 44 * @param clockAction 45 * @return 46 */ 47 public ClockLog getLastClockLog(String principalId, String clockAction); 48 49 /** 50 * Returns the last clock log for this user's assignment in a certain period 51 * @param principalId 52 * @param jobNumber 53 * @param workArea 54 * @param task 55 * @param calendarEntry 56 * @return 57 */ 58 public ClockLog getLastClockLog(String principalId, String jobNumber, String workArea, String task, CalendarEntries payCalendarEntry); 59 60 /** 61 * Fetch clock log by id 62 * @param tkClockLogId 63 * @return 64 */ 65 public ClockLog getClockLog(String tkClockLogId); 66 }