View Javadoc

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.earngroup.service;
17  
18  import java.sql.Date;
19  import java.util.List;
20  import java.util.Set;
21  
22  import org.kuali.hr.time.earngroup.EarnGroup;
23  import org.kuali.hr.time.timesheet.TimesheetDocument;
24  
25  public interface EarnGroupService {
26  	/**
27  	 * Fetch earn group for a particular date
28  	 * @param earnGroup
29  	 * @param asOfDate
30  	 * @return
31  	 */
32  	public EarnGroup getEarnGroup(String earnGroup, Date asOfDate);
33  	/**
34  	 * Fetch earn group for an earn code as of a particular date
35  	 * @param earnCode
36  	 * @param asOfDate
37  	 * @return
38  	 */
39  	public EarnGroup getEarnGroupForEarnCode(String earnCode, Date asOfDate);
40  	/**
41  	 * Fetch Set of earn codes for earn group
42  	 * @param earnGroup
43  	 * @param asOfDate
44  	 * @return
45  	 */
46  	public Set<String> getEarnCodeListForEarnGroup(String earnGroup, Date asOfDate);
47  	/**
48  	 * Used to get earn group that this earn code belongs on in context to the summary
49  	 * CAUTION this is used only for the timesheet summary
50  	 */
51  	public EarnGroup getEarnGroupSummaryForEarnCode(String earnCode, Date asOfDate);
52  	
53  	public EarnGroup getEarnGroup(String hrEarnGroupId);
54  	
55  	/**
56  	 * Returns list of warning text from earn group that is used by time blocks of the timesheetDocument
57  	 * @param timesheetDocument
58  	 * @return
59  	 */
60  	public List<String> warningTextFromEarnGroupsOfDocument(TimesheetDocument timesheetDocument);
61      /**
62       * get the count of earn groups by given earnGroup
63       * @param earnGroup
64       * @return int
65       */
66      public int getEarnGroupCount(String earnGroup);
67      /**
68       * get the count of newer version of earn groups by given earnGroup and date
69       * @param earnGroup
70       * @param effdt
71       * @return int
72       */
73      public int getNewerEarnGroupCount(String earnGroup, Date effdt);
74  }