1 package org.kuali.kpme.edo.supplemental.service;
2
3 import java.math.BigDecimal;
4 import java.util.List;
5
6 import org.kuali.kpme.edo.api.supplemental.EdoSupplementalTracking;
7 import org.kuali.kpme.edo.supplemental.EdoSupplementalTrackingBo;
8 import org.kuali.kpme.edo.supplemental.dao.EdoSupplementalTrackingDao;
9 import org.kuali.rice.core.api.mo.ModelObjectUtils;
10
11
12
13
14
15
16
17
18
19 public class EdoSupplementalTrackingServiceImpl implements EdoSupplementalTrackingService {
20
21 private EdoSupplementalTrackingDao edoSupplementalTrackingDao;
22
23 protected List<EdoSupplementalTracking> convertToImmutable(List<EdoSupplementalTrackingBo> bos) {
24 return ModelObjectUtils.transform(bos, EdoSupplementalTrackingBo.toImmutable);
25 }
26
27 public void setEdoSupplementalTrackingDao(EdoSupplementalTrackingDao edoSupplementalTrackingDao) {
28 this.edoSupplementalTrackingDao = edoSupplementalTrackingDao;
29 }
30
31 public EdoSupplementalTracking getSupplementalTrackingEntry(String edoSupplementalTrackingId) {
32 return EdoSupplementalTrackingBo.to(edoSupplementalTrackingDao.getSupplementalTrackingEntry(edoSupplementalTrackingId));
33 }
34
35 public List<EdoSupplementalTracking> getSupplementTrackingEntries() {
36 List<EdoSupplementalTrackingBo> bos = edoSupplementalTrackingDao.getSupplementTrackingEntries();
37 return convertToImmutable(bos);
38 }
39
40 public void saveOrUpdate(EdoSupplementalTracking edoSupplementalTracking) {
41 this.edoSupplementalTrackingDao.saveOrUpdate(EdoSupplementalTrackingBo.from(edoSupplementalTracking));
42 }
43
44 public EdoSupplementalTracking getSupplementalTrackingEntryObj(String edoDossierId, BigDecimal reviewLevel) {
45 return EdoSupplementalTrackingBo.to(this.edoSupplementalTrackingDao.getSupplementalTrackingEntryObj(edoDossierId,reviewLevel));
46 }
47
48
49
50
51 public EdoSupplementalTracking canSeeTheAcknowledgeWithAction(String edoDossierId, BigDecimal reviewLevel) {
52 return EdoSupplementalTrackingBo.to(this.edoSupplementalTrackingDao.canSeeTheAcknowledgeWithAction(edoDossierId, reviewLevel));
53 }
54
55 }