1 /** 2 * Copyright 2004-2012 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 * Return a list of all open clock logs 51 * @param payCalendarEntry 52 * @return 53 */ 54 public List<ClockLog> getOpenClockLogs(CalendarEntries payCalendarEntry); 55 56 /** 57 * Fetch clock log by id 58 * @param tkClockLogId 59 * @return 60 */ 61 public ClockLog getClockLog(String tkClockLogId); 62 }