1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.coa.service.impl;
17
18 import org.apache.log4j.Logger;
19 import org.kuali.ole.coa.dataaccess.PriorYearOrganizationDao;
20 import org.kuali.ole.coa.service.PriorYearOrganizationService;
21 import org.springframework.transaction.annotation.Transactional;
22
23
24
25
26 @Transactional
27 public class PriorYearOrganizationServiceImpl implements PriorYearOrganizationService {
28 private static final Logger LOG = Logger.getLogger(PriorYearOrganizationServiceImpl.class);
29
30 private PriorYearOrganizationDao priorYearOrganizationDao;
31
32
33
34
35 public PriorYearOrganizationServiceImpl() {
36 super();
37 }
38
39
40
41
42 public void populatePriorYearOrganizationsFromCurrent() {
43
44 int purgedCount = priorYearOrganizationDao.purgePriorYearOrganizations();
45 if (LOG.isInfoEnabled()) {
46 LOG.info("number of prior year organizations purged : " + purgedCount);
47 }
48
49 int copiedCount = priorYearOrganizationDao.copyCurrentOrganizationsToPriorYearTable();
50 if (LOG.isInfoEnabled()) {
51 LOG.info("number of current year organizations copied to prior year : " + copiedCount);
52 }
53 }
54
55
56
57
58
59
60 public void setPriorYearOrganizationDao(PriorYearOrganizationDao priorYearOrganizationDao) {
61 this.priorYearOrganizationDao = priorYearOrganizationDao;
62 }
63
64 }