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.time.clocklog.dao;
017
018 import java.util.List;
019
020 import org.kuali.hr.time.calendar.CalendarEntries;
021 import org.kuali.hr.time.clocklog.ClockLog;
022
023 public interface ClockLogDao {
024
025 /**
026 * Save or update ClockLog passed in
027 * @param clockLog
028 */
029 public void saveOrUpdate(ClockLog clockLog);
030 /**
031 * Save or update List of ClockLogs passed in
032 * @param clockLogList
033 */
034 public void saveOrUpdate(List<ClockLog> clockLogList);
035 /**
036 * Get last ClockLog for a given principalId
037 * @param principalId
038 * @return
039 */
040 public ClockLog getLastClockLog(String principalId);
041 /**
042 * Get last ClockLog for a given principalId and clockAction
043 * @param principalId
044 * @param clockAction
045 * @return
046 */
047 public ClockLog getLastClockLog(String principalId, String clockAction);
048
049 /**
050 * Returns the last clock log for this user's assignment in a certain period
051 * @param principalId
052 * @param jobNumber
053 * @param workArea
054 * @param task
055 * @param calendarEntry
056 * @return
057 */
058 public ClockLog getLastClockLog(String principalId, String jobNumber, String workArea, String task, CalendarEntries payCalendarEntry);
059
060 /**
061 * Fetch clock log by id
062 * @param tkClockLogId
063 * @return
064 */
065 public ClockLog getClockLog(String tkClockLogId);
066
067 public void deleteClockLogsForDocumentId(String documentId);
068
069 public ClockLog getLastClockLog(String principalId, String jobNumber, String workArea, String task, String timesheetId);
070 }