001package org.kuali.ole.deliver.lookup; 002 003import org.kuali.ole.OLEConstants; 004import org.kuali.ole.deliver.bo.OleStatisticalCategoryBo; 005import org.kuali.rice.krad.lookup.LookupableImpl; 006import org.kuali.rice.krad.util.GlobalVariables; 007import org.kuali.rice.krad.util.KRADConstants; 008import org.kuali.rice.krad.web.form.LookupForm; 009 010import java.util.ArrayList; 011import java.util.List; 012import java.util.Map; 013 014/** 015 * Created with IntelliJ IDEA. 016 * User: asham 017 * Date: 7/16/13 018 * Time: 3:18 PM 019 * To change this template use File | Settings | File Templates. 020 */ 021public class OleStatisticalCategoryBoLookupableImpl extends LookupableImpl { 022 023 @Override 024 protected List<?> getSearchResults(LookupForm form, Map<String, String> searchCriteria, boolean unbounded) { 025 026 List<?> searchResults; 027 List<OleStatisticalCategoryBo> finalSearchResult = new ArrayList<OleStatisticalCategoryBo>(); 028 List<OleStatisticalCategoryBo> oleStatisticalCategoryBo = new ArrayList<OleStatisticalCategoryBo>(); 029 030 031 oleStatisticalCategoryBo = (List<OleStatisticalCategoryBo>) super.getSearchResults(form, searchCriteria, unbounded); 032 finalSearchResult.addAll(oleStatisticalCategoryBo); 033 034 searchResults = finalSearchResult; 035 036 if (searchResults.size() == 0) { 037 GlobalVariables.getMessageMap().putError(KRADConstants.GLOBAL_ERRORS, OLEConstants.NO_RECORD_FOUND); 038 } 039 sortSearchResults(form, searchResults); 040 return searchResults; 041 } 042}