01: /*
02: * Copyright 2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
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.module.chart.service.impl;
17:
18: import org.apache.log4j.Logger;
19: import org.kuali.module.chart.dao.PriorYearOrganizationDao;
20: import org.kuali.module.chart.service.PriorYearOrganizationService;
21: import org.springframework.transaction.annotation.Transactional;
22:
23: /**
24: * This is the default implementation of the PriorYearOrganizationService
25: */
26: @Transactional
27: public class PriorYearOrganizationServiceImpl implements
28: PriorYearOrganizationService {
29: private static final Logger LOG = Logger
30: .getLogger(PriorYearOrganizationServiceImpl.class);
31:
32: private PriorYearOrganizationDao priorYearOrganizationDao;
33:
34: /**
35: * Constructs a PriorYearOrganizationServiceImpl.java.
36: */
37: public PriorYearOrganizationServiceImpl() {
38: super ();
39: }
40:
41: /**
42: * @see org.kuali.module.chart.service.PriorYearOrganizationService#populatePriorYearOrganizationFromCurrent()
43: */
44: public void populatePriorYearOrganizationsFromCurrent() {
45:
46: int purgedCount = priorYearOrganizationDao
47: .purgePriorYearOrganizations();
48: if (LOG.isInfoEnabled()) {
49: LOG.info("number of prior year organizations purged : "
50: + purgedCount);
51: }
52:
53: int copiedCount = priorYearOrganizationDao
54: .copyCurrentOrganizationsToPriorYearTable();
55: if (LOG.isInfoEnabled()) {
56: LOG
57: .info("number of current year organizations copied to prior year : "
58: + copiedCount);
59: }
60: }
61:
62: /**
63: * This method sets the local dao variable to the value provided.
64: *
65: * @param priorYearOrganizationDao The PriorYearOrganizationDao to set.
66: */
67: public void setPriorYearOrganizationDao(
68: PriorYearOrganizationDao priorYearOrganizationDao) {
69: this.priorYearOrganizationDao = priorYearOrganizationDao;
70: }
71:
72: }
|