1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.module.purap.service.impl;
17
18 import org.kuali.ole.module.purap.service.ItemUnitOfMeasureService;
19 import org.kuali.ole.sys.businessobject.UnitOfMeasure;
20 import org.kuali.rice.krad.service.BusinessObjectService;
21 import org.springframework.transaction.annotation.Transactional;
22
23
24
25
26
27 @Transactional
28 public class ItemUnitOfMeasureServiceImpl implements ItemUnitOfMeasureService {
29 protected static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(ItemUnitOfMeasureServiceImpl.class);
30
31 private BusinessObjectService businessObjectService;
32
33
34
35
36 public UnitOfMeasure getByPrimaryId(String itemUnitOfMeasureCode) {
37 UnitOfMeasure toBeRetrieved = new UnitOfMeasure();
38 toBeRetrieved.setItemUnitOfMeasureCode(itemUnitOfMeasureCode.toUpperCase());
39 UnitOfMeasure uom = (UnitOfMeasure) businessObjectService.retrieve(toBeRetrieved);
40 return uom;
41 }
42
43 public void setBusinessObjectService(BusinessObjectService businessObjectService) {
44 this.businessObjectService = businessObjectService;
45 }
46
47 }