1 package org.kuali.ole.select.keyvalue;
2
3 import org.kuali.ole.select.document.OLEPlatformRecordDocument;
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 public class OLEPlatformRecordDocumentKeyValues extends KeyValuesBase {
17
18 @Override
19 public List<KeyValue> getKeyValues() {
20 List<KeyValue> keyValues = new ArrayList<KeyValue>();
21 Collection<OLEPlatformRecordDocument> olePlatformRecordDocuments;
22 olePlatformRecordDocuments = KRADServiceLocator.getBusinessObjectService().findAll(OLEPlatformRecordDocument.class);
23 keyValues.add(new ConcreteKeyValue("", ""));
24 for (OLEPlatformRecordDocument olePlatformRecordDocument : olePlatformRecordDocuments) {
25 keyValues.add(new ConcreteKeyValue(olePlatformRecordDocument.getOlePlatformId(), olePlatformRecordDocument.getName()));
26 }
27 return keyValues;
28 }
29 }