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.Agency;
22  import org.kuali.ole.module.cg.service.AgencyService;
23  import org.kuali.ole.sys.OLEPropertyConstants;
24  import org.kuali.rice.krad.service.BusinessObjectService;
25  
26  
27  
28  
29  public class AgencyServiceImpl implements AgencyService {
30  
31      protected BusinessObjectService businessObjectService;
32  
33      
34  
35  
36      @Override
37      public Agency getByPrimaryId(String agencyNumber) {
38          return businessObjectService.findByPrimaryKey(Agency.class, mapPrimaryKeys(agencyNumber));
39      }
40  
41      protected Map<String, Object> mapPrimaryKeys(String agencyNumber) {
42          Map<String, Object> primaryKeys = new HashMap();
43          primaryKeys.put(OLEPropertyConstants.AGENCY_NUMBER, agencyNumber.trim());
44          return primaryKeys;
45      }
46  
47      public void setBusinessObjectService(BusinessObjectService businessObjectService) {
48          this.businessObjectService = businessObjectService;
49      }
50  }