1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.vnd.businessobject.lookup;
17
18 import java.util.Collections;
19 import java.util.List;
20 import java.util.Map;
21
22 import org.kuali.ole.sys.OLEConstants;
23 import org.kuali.rice.kns.lookup.AbstractLookupableHelperServiceImpl;
24 import org.kuali.rice.krad.bo.PersistableBusinessObject;
25 import org.kuali.rice.krad.util.BeanPropertyComparator;
26
27
28 public class VendorPhoneLookupableHelperServiceImpl extends AbstractLookupableHelperServiceImpl {
29
30
31
32
33
34 @Override
35 public List<PersistableBusinessObject> getSearchResults(Map<String, String> fieldValues) {
36 boolean unbounded = false;
37 super.setBackLocation((String) fieldValues.get(OLEConstants.BACK_LOCATION));
38 super.setDocFormKey((String) fieldValues.get(OLEConstants.DOC_FORM_KEY));
39
40 List<PersistableBusinessObject> searchResults = (List) getLookupService().findCollectionBySearchHelper(getBusinessObjectClass(), fieldValues, unbounded);
41
42
43
44 List<String> defaultSortColumns = getDefaultSortColumns();
45 if (defaultSortColumns.size() > 0) {
46 Collections.sort(searchResults, new BeanPropertyComparator(getDefaultSortColumns(), true));
47 }
48
49 return searchResults;
50 }
51
52 }