001/* 002 * Copyright 2005-2006 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 */ 016package org.kuali.ole.coa.service.impl; 017 018 019import org.kuali.ole.coa.businessobject.ProjectCode; 020import org.kuali.ole.coa.service.ProjectCodeService; 021import org.kuali.ole.sys.context.SpringContext; 022import org.kuali.ole.sys.service.NonTransactional; 023import org.kuali.rice.krad.service.BusinessObjectService; 024import org.springframework.cache.annotation.Cacheable; 025 026/** 027 * This class is the service implementation for the ProjectCode structure. This is the default implementation, that is delivered 028 * with Kuali. 029 */ 030 031@NonTransactional 032public class ProjectCodeServiceImpl implements ProjectCodeService { 033 /** 034 * 035 * @see org.kuali.ole.coa.service.ProjectCodeService#getByPrimaryId(java.lang.String) 036 */ 037 @Override 038 // KFSMI-2612 039 @Cacheable(value=ProjectCode.CACHE_NAME, key="'projectCode='+#p0") 040 public ProjectCode getByPrimaryId(String projectCode) { 041 return SpringContext.getBean(BusinessObjectService.class).findBySinglePrimaryKey(ProjectCode.class, projectCode); 042 } 043 044}