1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.module.purap.businessobject.options;
17
18 import org.kuali.ole.module.purap.businessobject.CapitalAssetSystemState;
19 import org.kuali.ole.sys.context.SpringContext;
20 import org.kuali.rice.core.api.util.ConcreteKeyValue;
21 import org.kuali.rice.krad.keyvalues.KeyValuesBase;
22 import org.kuali.rice.krad.service.KeyValuesService;
23
24 import java.util.ArrayList;
25 import java.util.Collection;
26 import java.util.List;
27
28
29
30
31 public class CapitalAssetSystemStateValuesFinder extends KeyValuesBase {
32
33
34
35
36
37
38 public List getKeyValues() {
39 KeyValuesService boService = SpringContext.getBean(KeyValuesService.class);
40 Collection types = boService.findAll(CapitalAssetSystemState.class);
41 List labels = new ArrayList();
42 labels.add(new ConcreteKeyValue("", ""));
43 for (Object type : types) {
44 CapitalAssetSystemState camsSystemState = (CapitalAssetSystemState) type;
45 labels.add(new ConcreteKeyValue(camsSystemState.getCapitalAssetSystemStateCode(), camsSystemState.getCapitalAssetSystemStateDescription()));
46 }
47
48 return labels;
49 }
50
51 }