View Javadoc

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