001package org.kuali.ole.deliver.keyvalue; 002 003import org.kuali.ole.deliver.bo.OleCirculationDesk; 004import org.kuali.rice.core.api.util.ConcreteKeyValue; 005import org.kuali.rice.core.api.util.KeyValue; 006import org.kuali.rice.krad.keyvalues.KeyValuesBase; 007import org.kuali.rice.krad.service.KRADServiceLocator; 008 009import java.util.*; 010 011/** 012 * Created with IntelliJ IDEA. 013 * User: ? 014 * Date: 12/13/12 015 * Time: 4:54 PM 016 * To change this template use File | Settings | File Templates. 017 */ 018public class CirculationDeskKeyValueFinder extends KeyValuesBase { 019 020 @Override 021 public List<KeyValue> getKeyValues() { 022 List<KeyValue> options = new ArrayList<KeyValue>(); 023 Map<String, String> userMap = new HashMap<String, String>(); 024 userMap.put("pickUpLocation", "true"); 025 /* List<String> myList = new CopyOnWriteArrayList<String>()<String>();*/ 026 Collection<OleCirculationDesk> oleCirculationDesks = KRADServiceLocator.getBusinessObjectService().findMatching(OleCirculationDesk.class, userMap); 027 options.add(new ConcreteKeyValue("", "")); 028 for (OleCirculationDesk oleCirculationDesk : oleCirculationDesks) { 029 030 options.add(new ConcreteKeyValue(oleCirculationDesk.getCirculationDeskId(), oleCirculationDesk.getCirculationDeskCode())); 031 032 } 033 return options; 034 } 035}