View Javadoc
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   * Created with IntelliJ IDEA.
13   * User: ?
14   * Date: 12/13/12
15   * Time: 4:54 PM
16   * To change this template use File | Settings | File Templates.
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          /*  List<String> myList = new CopyOnWriteArrayList<String>()<String>();*/
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  }