1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.module.cg.service.impl;
17
18 import java.util.HashMap;
19 import java.util.Map;
20
21 import org.kuali.ole.module.cg.businessobject.SubContractor;
22 import org.kuali.ole.module.cg.service.SubcontractorService;
23 import org.kuali.ole.sys.OLEPropertyConstants;
24 import org.kuali.rice.krad.service.BusinessObjectService;
25
26
27
28
29 public class SubcontractorServiceImpl implements SubcontractorService {
30
31 protected BusinessObjectService businessObjectService;
32
33
34
35
36 @Override
37 public SubContractor getByPrimaryId(String subcontractorNumber) {
38 return businessObjectService.findByPrimaryKey(SubContractor.class, mapPrimaryKeys(subcontractorNumber));
39 }
40
41 protected Map<String, Object> mapPrimaryKeys(String subcontractorNumber) {
42 Map<String, Object> primaryKeys = new HashMap<String, Object>();
43 primaryKeys.put(OLEPropertyConstants.SUBCONTRACTOR_NUMBER, subcontractorNumber.trim());
44 return primaryKeys;
45 }
46
47 public void setBusinessObjectService(BusinessObjectService businessObjectService) {
48 this.businessObjectService = businessObjectService;
49 }
50 }