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