1 package org.kuali.ole.describe.keyvalue;
2
3 import org.kuali.ole.describe.bo.OleStatisticalSearchingCodes;
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.ArrayList;
10 import java.util.Collection;
11 import java.util.List;
12
13
14
15
16
17
18
19
20 public class OLEStatisticalSearchingCodesValueFinder extends KeyValuesBase {
21 public List<KeyValue> getKeyValues() {
22 List<KeyValue> options = new ArrayList<KeyValue>();
23 Collection<OleStatisticalSearchingCodes> oleStatisticalSearchingCodes = KRADServiceLocator.getBusinessObjectService().findAll(OleStatisticalSearchingCodes.class);
24 options.add(new ConcreteKeyValue("", ""));
25 for (OleStatisticalSearchingCodes type : oleStatisticalSearchingCodes) {
26 if (type.isActive()) {
27 options.add(new ConcreteKeyValue(type.getStatisticalSearchingCodeId().toString(), type.getStatisticalSearchingName()));
28 }
29 }
30 return options;
31 }
32 }