1 package org.kuali.ole.deliver.lookup;
2
3 import org.kuali.ole.OLEConstants;
4 import org.kuali.ole.deliver.bo.OleStatisticalCategoryBo;
5 import org.kuali.rice.krad.lookup.LookupableImpl;
6 import org.kuali.rice.krad.util.GlobalVariables;
7 import org.kuali.rice.krad.util.KRADConstants;
8 import org.kuali.rice.krad.web.form.LookupForm;
9
10 import java.util.ArrayList;
11 import java.util.List;
12 import java.util.Map;
13
14
15
16
17
18
19
20
21 public class OleStatisticalCategoryBoLookupableImpl extends LookupableImpl {
22
23 @Override
24 protected List<?> getSearchResults(LookupForm form, Map<String, String> searchCriteria, boolean unbounded) {
25
26 List<?> searchResults;
27 List<OleStatisticalCategoryBo> finalSearchResult = new ArrayList<OleStatisticalCategoryBo>();
28 List<OleStatisticalCategoryBo> oleStatisticalCategoryBo = new ArrayList<OleStatisticalCategoryBo>();
29
30
31 oleStatisticalCategoryBo = (List<OleStatisticalCategoryBo>) super.getSearchResults(form, searchCriteria, unbounded);
32 finalSearchResult.addAll(oleStatisticalCategoryBo);
33
34 searchResults = finalSearchResult;
35
36 if (searchResults.size() == 0) {
37 GlobalVariables.getMessageMap().putError(KRADConstants.GLOBAL_ERRORS, OLEConstants.NO_RECORD_FOUND);
38 }
39 sortSearchResults(form, searchResults);
40 return searchResults;
41 }
42 }