1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.vnd.service.impl;
17
18 import org.kuali.ole.vnd.businessobject.CommodityCode;
19 import org.kuali.ole.vnd.dataaccess.CommodityCodeDao;
20 import org.kuali.ole.vnd.service.CommodityCodeService;
21 import org.kuali.rice.krad.service.BusinessObjectService;
22 import org.springframework.transaction.annotation.Transactional;
23
24
25
26
27
28
29
30 @Transactional
31 public class CommodityCodeServiceImpl implements CommodityCodeService {
32 protected static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(CommodityCodeServiceImpl.class);
33
34 private BusinessObjectService businessObjectService;
35 private CommodityCodeDao commodityCodeDao;
36
37
38
39
40 public CommodityCode getByPrimaryId(String purchasingCommodityCode) {
41 CommodityCode ccToBeRetrieved = new CommodityCode();
42 ccToBeRetrieved.setPurchasingCommodityCode(purchasingCommodityCode.toUpperCase());
43 CommodityCode cc = (CommodityCode)businessObjectService.retrieve( ccToBeRetrieved );
44 return cc;
45 }
46
47
48
49
50 public boolean wildCardCommodityCodeExists(String wildCardCommodityCode) {
51 return commodityCodeDao.wildCardCommodityCodeExists(wildCardCommodityCode);
52 }
53
54 public void setBusinessObjectService(BusinessObjectService businessObjectService) {
55 this.businessObjectService = businessObjectService;
56 }
57
58 public void setCommodityCodeDao(CommodityCodeDao commodityCodeDao) {
59 this.commodityCodeDao = commodityCodeDao;
60 }
61
62 }