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.ld.service.impl; 017 018 import java.util.Collection; 019 import java.util.HashMap; 020 import java.util.Map; 021 022 import org.kuali.kfs.module.ld.businessobject.PositionObjectBenefit; 023 import org.kuali.kfs.module.ld.service.LaborPositionObjectBenefitService; 024 import org.kuali.rice.kns.service.BusinessObjectService; 025 026 /** 027 * This class provides its clients with access to labor position object benefit entries in the backend data store. 028 * 029 * @see org.kuali.kfs.module.ld.businessobject.PositionObjectBenefit 030 */ 031 public class LaborPositionObjectBenefitServiceImpl implements LaborPositionObjectBenefitService { 032 033 private BusinessObjectService businessObjectService; 034 035 /** 036 * @see org.kuali.kfs.module.ld.service.LaborPositionObjectBenefitService#getPositionObjectBenefits(java.lang.Integer, 037 * java.lang.String, java.lang.String) 038 */ 039 public Collection<PositionObjectBenefit> getPositionObjectBenefits(Integer universityFiscalYear, String chartOfAccountsCode, String financialObjectCode) { 040 041 Map fieldValues = new HashMap(); 042 fieldValues.put("universityFiscalYear", universityFiscalYear); 043 fieldValues.put("chartOfAccountsCode", chartOfAccountsCode); 044 fieldValues.put("financialObjectCode", financialObjectCode); 045 046 return businessObjectService.findMatching(PositionObjectBenefit.class, fieldValues); 047 } 048 049 /** 050 * Sets the businessObjectService attribute value. 051 * 052 * @param businessObjectService The businessObjectService to set. 053 */ 054 public void setBusinessObjectService(BusinessObjectService businessObjectService) { 055 this.businessObjectService = businessObjectService; 056 } 057 }