View Javadoc
1   /*
2    * Copyright 2007 The Kuali Foundation
3    * 
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    * http://www.opensource.org/licenses/ecl2.php
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.ole.gl.service.impl;
17  
18  import java.sql.Date;
19  
20  import org.kuali.ole.gl.businessobject.CollectorDetail;
21  import org.kuali.ole.gl.dataaccess.CollectorDetailDao;
22  import org.kuali.ole.gl.service.CollectorDetailService;
23  import org.kuali.ole.sys.context.SpringContext;
24  import org.kuali.rice.krad.service.BusinessObjectService;
25  import org.springframework.transaction.annotation.Transactional;
26  
27  /**
28   * The base implementation of CollectorDetailService
29   */
30  @Transactional
31  public class CollectorDetailServiceImpl implements CollectorDetailService {
32      private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(CollectorDetailServiceImpl.class);
33  
34      private CollectorDetailDao collectorDetailDao;
35  
36      /**
37       * Purge the sufficient funds balance table by year/chart
38       * 
39       * @param chart chart of CollectorDetails to purge
40       * @param year year of CollectorDetails to purage
41       * @see org.kuali.ole.gl.service.CollectorDetailService#purgeYearByChart(java.lang.String, int)
42       */
43      public void purgeYearByChart(String chartOfAccountsCode, int universityFiscalYear) {
44          LOG.debug("purgeYearByChart() started");
45  
46          collectorDetailDao.purgeYearByChart(chartOfAccountsCode, universityFiscalYear);
47      }
48      
49      public Integer getNextCreateSequence(Date date) {
50          return collectorDetailDao.getMaxCreateSequence(date);
51      }
52  
53      /**
54       * Saves a CollectorDetail
55       * 
56       * @param detail the detail to save
57       * @see org.kuali.ole.gl.service.CollectorDetailService#save(org.kuali.ole.gl.businessobject.CollectorDetail)
58       */
59      public void save(CollectorDetail detail) {
60          LOG.debug("save() started");
61          SpringContext.getBean(BusinessObjectService.class).save(detail);
62      }
63  
64      public void setCollectorDetailDao(CollectorDetailDao idbd) {
65          collectorDetailDao = idbd;
66      }
67  }