1 package org.kuali.ole.deliver.circulationdesk.keyvalue;
2
3 import org.kuali.ole.deliver.circulationdesk.bo.OleCirculationDesk;
4 import org.kuali.ole.deliver.circulationdesk.bo.OleCirculationDeskDetail;
5 import org.kuali.rice.core.api.util.ConcreteKeyValue;
6 import org.kuali.rice.core.api.util.KeyValue;
7 import org.kuali.rice.krad.keyvalues.KeyValuesBase;
8 import org.kuali.rice.krad.service.KRADServiceLocator;
9
10 import java.util.*;
11
12
13
14
15
16
17
18
19 public class CirculationDeskKeyValueFinder extends KeyValuesBase {
20
21 @Override
22 public List<KeyValue> getKeyValues() {
23 List<KeyValue> options = new ArrayList<KeyValue>();
24 Map<String,String> userMap = new HashMap<String,String>();
25 userMap.put("pickUpLocation","true");
26
27 Collection<OleCirculationDesk> oleCirculationDesks = KRADServiceLocator.getBusinessObjectService().findMatching(OleCirculationDesk.class,userMap);
28 options.add(new ConcreteKeyValue("",""));
29 for (OleCirculationDesk oleCirculationDesk : oleCirculationDesks) {
30
31 options.add(new ConcreteKeyValue(oleCirculationDesk.getCirculationDeskId(), oleCirculationDesk.getCirculationDeskCode()));
32
33 }
34 return options;
35 }
36 }