1 /** 2 * Copyright 2005-2015 The Kuali Foundation 3 * 4 * Licensed under the Educational Community License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.opensource.org/licenses/ecl2.php 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package edu.sampleu.travel; 17 18 import org.kuali.rice.krad.lookup.LookupForm; 19 import org.kuali.rice.krad.lookup.LookupableImpl; 20 import java.util.Collection; 21 import java.util.Map; 22 23 /** 24 * @author Kuali Rice Team (rice.collab@kuali.org) 25 */ 26 public class TravelLookupableImpl extends LookupableImpl { 27 28 /** 29 * Override the performSearch method so that we can perform any additional filtering of results from the standard query. 30 * Here we are getting the additional parameters being passed in and filtering on minSubsidized value. 31 * 32 * @{inheritDoc} 33 */ 34 @Override 35 public Collection<?> performSearch(LookupForm form, Map<String, String> searchCriteria, boolean bounded) { 36 // get additional parameter 37 String minSubsidized = form.getInitialRequestParameters().get("minSubsidized")[0]; 38 39 searchCriteria.put("subsidizedPercent", ">=" + minSubsidized); 40 41 return super.performSearch(form, searchCriteria,bounded); 42 } 43 44 }