1 /**
2 * Copyright 2004-2014 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.kpme.tklm.api.time.timehourdetail;
17
18 import org.kuali.kpme.tklm.api.time.timeblock.TimeBlock;
19 import org.kuali.kpme.tklm.api.time.timehourdetail.TimeHourDetail;
20 import org.springframework.cache.annotation.CacheEvict;
21 import org.springframework.cache.annotation.Caching;
22
23 import java.util.List;
24
25
26 public interface TimeHourDetailService{
27 /**
28 * Fetch TimeHourDetail based on id given
29 * @param timeHourDetailId
30 * @return
31 */
32 public TimeHourDetail getTimeHourDetail(String timeHourDetailId);
33 /**
34 * Save time hour detail for a given TimeBlock
35 * @param timeBlock
36 * @return
37 */
38 @Caching(evict = {
39 @CacheEvict(value={TimeBlock.CACHE_NAME}, allEntries = true)
40 })
41 public TimeHourDetail saveTimeHourDetail(TimeBlock timeBlock);
42 /**
43 * Remove TimeHourDetail for the given id
44 * @param timeBlockId
45 */
46 @Caching(evict = {
47 @CacheEvict(value={TimeBlock.CACHE_NAME}, allEntries = true)
48 })
49 public void removeTimeHourDetails(String timeBlockId);
50
51 /**
52 * Fetch List of TimeHourDetail based on time block id
53 * @param timeBlockId
54 * @return
55 */
56 public List<TimeHourDetail> getTimeHourDetailsForTimeBlock(String timeBlockId);
57
58
59 void removeTimeHourDetail(String timeHourDetailId);
60 }