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.coa.service.impl;
017    
018    
019    import org.kuali.kfs.coa.businessobject.ProjectCode;
020    import org.kuali.kfs.coa.dataaccess.ProjectCodeDao;
021    import org.kuali.kfs.coa.service.ProjectCodeService;
022    import org.kuali.kfs.sys.service.NonTransactional;
023    import org.kuali.rice.kns.util.spring.CacheNoCopy;
024    
025    /**
026     * This class is the service implementation for the ProjectCode structure. This is the default implementation, that is delivered
027     * with Kuali.
028     */
029    
030    @NonTransactional
031    public class ProjectCodeServiceImpl implements ProjectCodeService {
032        private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(ProjectCodeServiceImpl.class);
033    
034        private ProjectCodeDao projectCodeDao;
035    
036        /**
037         * 
038         * @see org.kuali.kfs.coa.service.ProjectCodeService#getByPrimaryId(java.lang.String)
039         */
040        //   KFSMI-2612
041        @CacheNoCopy
042        public ProjectCode getByPrimaryId(String projectCode) {
043            return projectCodeDao.getByPrimaryId(projectCode);
044        }
045    
046        /**
047         * 
048         * @see org.kuali.kfs.coa.service.ProjectCodeService#getByName(java.lang.String)
049         */
050        public ProjectCode getByName(String name) {
051            return projectCodeDao.getByName(name);
052        }
053    
054        /**
055         * @param projectDao The projectDao to set.
056         */
057        public void setProjectCodeDao(ProjectCodeDao projectCodeDao) {
058            this.projectCodeDao = projectCodeDao;
059        }
060    
061    }