001    /*
002     * Copyright 2011 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.kfs.module.purap.document.service.impl;
017    
018    import java.util.Collection;
019    
020    import org.apache.log4j.Logger;
021    import org.kuali.kfs.module.purap.businessobject.ReceivingThreshold;
022    import org.kuali.kfs.module.purap.document.dataaccess.ThresholdDao;
023    import org.kuali.kfs.module.purap.document.service.ThresholdService;
024    import org.springframework.transaction.annotation.Transactional;
025    
026    @Transactional
027    public class ThresholdServiceImpl implements ThresholdService{
028    
029        private static Logger LOG = Logger.getLogger(ThresholdServiceImpl.class);
030    
031        private ThresholdDao dao;
032    
033        public void setThresholdDao(ThresholdDao dao) {
034            this.dao = dao;
035        }
036        
037        public Collection<ReceivingThreshold> findByChart(String chartCode) {
038            return dao.findByChart(chartCode);
039        }
040    
041        public Collection<ReceivingThreshold> findByChartAndFund(String chartCode, String fund) {
042            return dao.findByChartAndFund(chartCode,fund);
043        }
044    
045        public Collection<ReceivingThreshold> findByChartAndSubFund(String chartCode, String subFund) {
046            return dao.findByChartAndSubFund(chartCode,subFund);
047        }
048    
049        public Collection<ReceivingThreshold> findByChartAndCommodity(String chartCode, String commodity) {
050            return dao.findByChartAndCommodity(chartCode,commodity);
051        }
052    
053        public Collection<ReceivingThreshold> findByChartAndObjectCode(String chartCode, String objectCode) {
054            return dao.findByChartAndObjectCode(chartCode,objectCode);
055        }
056    
057        public Collection<ReceivingThreshold> findByChartAndOrg(String chartCode, String org) {
058            return dao.findByChartAndOrg(chartCode,org);
059        }
060    
061        public Collection<ReceivingThreshold> findByChartAndVendor(String chartCode, 
062                                                          String vendorHeaderGeneratedIdentifier,
063                                                          String vendorDetailAssignedIdentifier){
064            return dao.findByChartAndVendor(chartCode,vendorHeaderGeneratedIdentifier,vendorDetailAssignedIdentifier);
065        }
066    
067    }