001 /** 002 * Copyright 2004-2012 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 * Return a list of all open clock logs 051 * @param payCalendarEntry 052 * @return 053 */ 054 public List<ClockLog> getOpenClockLogs(CalendarEntries payCalendarEntry); 055 056 /** 057 * Fetch clock log by id 058 * @param tkClockLogId 059 * @return 060 */ 061 public ClockLog getClockLog(String tkClockLogId); 062 }