001/* 002 * The Kuali Financial System, a comprehensive financial management system for higher education. 003 * 004 * Copyright 2005-2014 The Kuali Foundation 005 * 006 * This program is free software: you can redistribute it and/or modify 007 * it under the terms of the GNU Affero General Public License as 008 * published by the Free Software Foundation, either version 3 of the 009 * License, or (at your option) any later version. 010 * 011 * This program is distributed in the hope that it will be useful, 012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 014 * GNU Affero General Public License for more details. 015 * 016 * You should have received a copy of the GNU Affero General Public License 017 * along with this program. If not, see <http://www.gnu.org/licenses/>. 018 */ 019package org.kuali.kfs.gl.service.impl; 020 021import java.sql.Date; 022 023import org.kuali.kfs.gl.businessobject.CollectorDetail; 024import org.kuali.kfs.gl.dataaccess.CollectorDetailDao; 025import org.kuali.kfs.gl.service.CollectorDetailService; 026import org.kuali.kfs.sys.context.SpringContext; 027import org.kuali.rice.krad.service.BusinessObjectService; 028import org.springframework.transaction.annotation.Transactional; 029 030/** 031 * The base implementation of CollectorDetailService 032 */ 033@Transactional 034public class CollectorDetailServiceImpl implements CollectorDetailService { 035 private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(CollectorDetailServiceImpl.class); 036 037 private CollectorDetailDao collectorDetailDao; 038 039 /** 040 * Purge the sufficient funds balance table by year/chart 041 * 042 * @param chart chart of CollectorDetails to purge 043 * @param year year of CollectorDetails to purage 044 * @see org.kuali.kfs.gl.service.CollectorDetailService#purgeYearByChart(java.lang.String, int) 045 */ 046 public void purgeYearByChart(String chartOfAccountsCode, int universityFiscalYear) { 047 LOG.debug("purgeYearByChart() started"); 048 049 collectorDetailDao.purgeYearByChart(chartOfAccountsCode, universityFiscalYear); 050 } 051 052 public Integer getNextCreateSequence(Date date) { 053 return collectorDetailDao.getMaxCreateSequence(date); 054 } 055 056 /** 057 * Saves a CollectorDetail 058 * 059 * @param detail the detail to save 060 * @see org.kuali.kfs.gl.service.CollectorDetailService#save(org.kuali.kfs.gl.businessobject.CollectorDetail) 061 */ 062 public void save(CollectorDetail detail) { 063 LOG.debug("save() started"); 064 SpringContext.getBean(BusinessObjectService.class).save(detail); 065 } 066 067 public void setCollectorDetailDao(CollectorDetailDao idbd) { 068 collectorDetailDao = idbd; 069 } 070}