1 package org.kuali.ole.select.lookup;
2
3 import org.kuali.ole.OLEConstants;
4 import org.kuali.ole.select.bo.OLERoleBo;
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 public class OLERoleLookupableImpl extends LookupableImpl {
18
19 @Override
20 protected List<?> getSearchResults(LookupForm form, Map<String, String> searchCriteria, boolean unbounded) {
21
22 List<?> searchResults;
23 List<OLERoleBo> finalSearchResult = new ArrayList<OLERoleBo>();
24 List<OLERoleBo> oleRoleBo = new ArrayList<OLERoleBo>();
25 oleRoleBo = (List<OLERoleBo>) super.getSearchResults(form, searchCriteria, unbounded);
26 finalSearchResult.addAll(oleRoleBo);
27
28 searchResults = finalSearchResult;
29 if (searchResults.size() == 0) {
30 GlobalVariables.getMessageMap().putError(KRADConstants.GLOBAL_ERRORS, OLEConstants.NO_RECORD_FOUND);
31 }
32 sortSearchResults(form, searchResults);
33 return searchResults;
34 }
35
36
37
38
39 }