1 package org.kuali.ole.license.lookup;
2
3 import org.kuali.ole.service.OleAgreementSearchService;
4 import org.kuali.rice.krad.lookup.LookupUtils;
5 import org.kuali.rice.krad.lookup.LookupableImpl;
6 import org.kuali.rice.krad.web.form.LookupForm;
7
8 import java.util.Collection;
9 import java.util.List;
10 import java.util.Map;
11
12
13
14
15 public class OleAgreementSearchLookupableImpl extends LookupableImpl {
16
17 OleAgreementSearchService agreementSearchService = new OleAgreementSearchService();
18 @Override
19 public Collection<?> performSearch(LookupForm form, Map<String, String> searchCriteria, boolean bounded) {
20 Collection<?> displayList;
21
22 LookupUtils.preprocessDateFields(searchCriteria);
23 displayList = agreementSearchService.getAgreementInformation(searchCriteria);
24
25
26 for (Object object : displayList) {
27 if (isResultReturnable(object)) {
28 form.setAtLeastOneRowReturnable(true);
29 }
30 }
31
32 return displayList;
33 }
34 }