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.gl.service.impl;
017
018 import java.sql.Date;
019
020 import org.kuali.kfs.gl.businessobject.CollectorDetail;
021 import org.kuali.kfs.gl.dataaccess.CollectorDetailDao;
022 import org.kuali.kfs.gl.service.CollectorDetailService;
023 import org.springframework.transaction.annotation.Transactional;
024
025 /**
026 * The base implementation of CollectorDetailService
027 */
028 @Transactional
029 public class CollectorDetailServiceImpl implements CollectorDetailService {
030 private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(CollectorDetailServiceImpl.class);
031
032 private CollectorDetailDao collectorDetailDao;
033
034 /**
035 * Purge the sufficient funds balance table by year/chart
036 *
037 * @param chart chart of CollectorDetails to purge
038 * @param year year of CollectorDetails to purage
039 * @see org.kuali.kfs.gl.service.CollectorDetailService#purgeYearByChart(java.lang.String, int)
040 */
041 public void purgeYearByChart(String chartOfAccountsCode, int universityFiscalYear) {
042 LOG.debug("purgeYearByChart() started");
043
044 collectorDetailDao.purgeYearByChart(chartOfAccountsCode, universityFiscalYear);
045 }
046
047 public Integer getNextCreateSequence(Date date) {
048 return collectorDetailDao.getMaxCreateSequence(date);
049 }
050
051 /**
052 * Saves a CollectorDetail
053 *
054 * @param detail the detail to save
055 * @see org.kuali.kfs.gl.service.CollectorDetailService#save(org.kuali.kfs.gl.businessobject.CollectorDetail)
056 */
057 public void save(CollectorDetail detail) {
058 LOG.debug("save() started");
059
060 collectorDetailDao.save(detail);
061 }
062
063 public void setCollectorDetailDao(CollectorDetailDao idbd) {
064 collectorDetailDao = idbd;
065 }
066 }