001    /**
002     * Copyright 2004-2013 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.lm.leaveblock.service;
017    
018    import java.util.Date;
019    import java.util.List;
020    
021    import org.kuali.hr.lm.leaveblock.LeaveBlockHistory;
022    import org.kuali.hr.lm.leaveblock.dao.LeaveBlockHistoryDao;
023    
024    public class LeaveBlockHistoryServiceImpl implements LeaveBlockHistoryService {
025    
026            private LeaveBlockHistoryDao leaveBlockHistoryDao;
027            
028            public void setLeaveBlockHistoryDao(LeaveBlockHistoryDao leaveBlockHistoryDao) {
029                    this.leaveBlockHistoryDao = leaveBlockHistoryDao;
030            }
031    
032            @Override
033            public void saveLeaveBlockHistory(LeaveBlockHistory leaveBlockHistory) {
034                     leaveBlockHistoryDao.saveOrUpdate(leaveBlockHistory);
035            }
036    
037            @Override
038            public void saveLeaveBlockHistoryList(List<LeaveBlockHistory> leaveBlockHistoryList) {
039                    leaveBlockHistoryDao.saveOrUpdate(leaveBlockHistoryList);
040            }
041    
042            @Override
043            public List<LeaveBlockHistory> getLeaveBlockHistoryByLmLeaveBlockId(
044                            String lmLeaveBlockId) {
045                    return leaveBlockHistoryDao.getLeaveBlockHistoryByLmLeaveBlockId(lmLeaveBlockId);
046            }
047    
048            @Override
049            public List<LeaveBlockHistory> getLeaveBlockHistories(String principalId,
050                            List<String> requestStatus) {
051                    return leaveBlockHistoryDao.getLeaveBlockHistories(principalId, requestStatus);
052            }
053    
054            @Override
055            public List<LeaveBlockHistory> getLeaveBlockHistoriesForLeaveDisplay(
056                            String principalId, Date beginDate, Date endDate, boolean considerModifiedUser) {
057                    return leaveBlockHistoryDao.getLeaveBlockHistoriesForLeaveDisplay(principalId, beginDate, endDate, considerModifiedUser);
058            }
059            
060            @Override
061            public List<LeaveBlockHistory> getLeaveBlockHistories(String principalId,String requestStatus, String action, Date currentDate) {
062                    return leaveBlockHistoryDao.getLeaveBlockHistories(principalId, requestStatus, action, currentDate);
063            }
064            
065    
066    }