1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.fp.businessobject.options;
17
18 import java.util.ArrayList;
19 import java.util.HashMap;
20 import java.util.Iterator;
21 import java.util.List;
22 import java.util.Map;
23
24 import org.kuali.ole.fp.businessobject.TravelPerDiem;
25 import org.kuali.ole.sys.OLEPropertyConstants;
26 import org.kuali.ole.sys.context.SpringContext;
27 import org.kuali.ole.sys.service.UniversityDateService;
28 import org.kuali.rice.core.api.util.ConcreteKeyValue;
29 import org.kuali.rice.krad.keyvalues.KeyValuesBase;
30 import org.kuali.rice.krad.service.KeyValuesService;
31
32
33
34
35 public class TravelPerDiemCategoryValuesFinder extends KeyValuesBase {
36
37
38
39
40 public List getKeyValues() {
41 Map criteria = new HashMap();
42 criteria.put(OLEPropertyConstants.UNIVERSITY_FISCAL_YEAR, SpringContext.getBean(UniversityDateService.class).getCurrentFiscalYear());
43
44 List boList = (List) SpringContext.getBean(KeyValuesService.class).findMatching(TravelPerDiem.class, criteria);
45 List keyValues = new ArrayList();
46 keyValues.add(new ConcreteKeyValue("", ""));
47 for (Iterator iter = boList.iterator(); iter.hasNext();) {
48 TravelPerDiem element = (TravelPerDiem) iter.next();
49 keyValues.add(new ConcreteKeyValue(element.getPerDiemCountryName(), element.getPerDiemCountryName()));
50 }
51
52 return keyValues;
53 }
54
55 }