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.earngroup.service;
017
018 import java.sql.Date;
019 import java.util.List;
020 import java.util.Set;
021
022 import org.kuali.hr.time.earngroup.EarnGroup;
023 import org.kuali.hr.time.timesheet.TimesheetDocument;
024
025 public interface EarnGroupService {
026 /**
027 * Fetch earn group for a particular date
028 * @param earnGroup
029 * @param asOfDate
030 * @return
031 */
032 public EarnGroup getEarnGroup(String earnGroup, Date asOfDate);
033 /**
034 * Fetch earn group for an earn code as of a particular date
035 * @param earnCode
036 * @param asOfDate
037 * @return
038 */
039 public EarnGroup getEarnGroupForEarnCode(String earnCode, Date asOfDate);
040 /**
041 * Fetch Set of earn codes for earn group
042 * @param earnGroup
043 * @param asOfDate
044 * @return
045 */
046 public Set<String> getEarnCodeListForEarnGroup(String earnGroup, Date asOfDate);
047 /**
048 * Used to get earn group that this earn code belongs on in context to the summary
049 * CAUTION this is used only for the timesheet summary
050 */
051 public EarnGroup getEarnGroupSummaryForEarnCode(String earnCode, Date asOfDate);
052
053 public EarnGroup getEarnGroup(String hrEarnGroupId);
054
055 /**
056 * Returns list of warning text from earn group that is used by time blocks of the timesheetDocument
057 * @param timesheetDocument
058 * @return
059 */
060 public List<String> warningTextFromEarnGroupsOfDocument(TimesheetDocument timesheetDocument);
061 /**
062 * get the count of earn groups by given earnGroup
063 * @param earnGroup
064 * @return int
065 */
066 public int getEarnGroupCount(String earnGroup);
067 /**
068 * get the count of newer version of earn groups by given earnGroup and date
069 * @param earnGroup
070 * @param effdt
071 * @return int
072 */
073 public int getNewerEarnGroupCount(String earnGroup, Date effdt);
074 }