View Javadoc

1   /**
2    * Copyright 2004-2013 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.dept.lunch.service;
17  
18  import java.sql.Date;
19  import java.util.List;
20  
21  import org.kuali.hr.time.dept.lunch.DeptLunchRule;
22  import org.kuali.hr.time.timeblock.TimeBlock;
23  import org.springframework.cache.annotation.Cacheable;
24  
25  public interface DepartmentLunchRuleService {
26  	/**
27  	 * Fetch department lunch rule based on criteria passed in
28  	 * @param dept
29  	 * @param workArea
30  	 * @param principalId
31  	 * @param jobNumber
32  	 * @param asOfDate
33  	 * @return
34  	 */
35      @Cacheable(value= DeptLunchRule.CACHE_NAME,
36              key="'dept=' + #p0" +
37                      "+ '|' + 'workArea=' + #p1" +
38                      "+ '|' + 'principalId=' + #p2" +
39                      "+ '|' + 'jobNumber=' + #p3" +
40                      "+ '|' + 'asOfDate=' + #p4")
41  	public DeptLunchRule getDepartmentLunchRule(String dept, Long workArea, String principalId, Long jobNumber, Date asOfDate);
42  	/**
43  	 * Apply department lunch rule to the list of timeblocks
44  	 * @param timeblocks
45  	 */
46  	public void applyDepartmentLunchRule(List<TimeBlock> timeblocks);
47  	
48  	/**
49  	 * Fetch department lunch rule by id
50  	 * @param tkDeptLunchRuleId
51  	 * @return
52  	 */
53      @Cacheable(value= DeptLunchRule.CACHE_NAME, key="'tkDeptLunchRuleId=' + #p0")
54  	public DeptLunchRule getDepartmentLunchRule(String tkDeptLunchRuleId);
55  
56      List<DeptLunchRule> getDepartmentLunchRules(String dept, String workArea, String principalId, String jobNumber, String active);
57  }