001/** 002 * Copyright 2005-2014 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.rice.krad.criteria; 017 018import org.kuali.rice.core.api.criteria.GenericQueryResults; 019import org.kuali.rice.core.api.criteria.LookupCustomizer; 020import org.kuali.rice.core.api.criteria.QueryByCriteria; 021import org.kuali.rice.krad.util.LegacyDataFramework; 022 023/** 024 * Defines basic methods that CriteriaLookup Dao's must provide 025 * 026 * @author Kuali Rice Team (rice.collab@kuali.org) 027 * @deprecated use new KRAD Data framework {@link org.kuali.rice.krad.data.DataObjectService} 028 */ 029@Deprecated 030@LegacyDataFramework 031public interface CriteriaLookupDao { 032 033 /** 034 * Looks up a type based on a query criteria. 035 * 036 * @param queryClass the class to lookup 037 * @param criteria the criteria to lookup against. cannot be null. 038 * @param <T> the type that is being looked up. 039 * @return the results. will never be null. 040 * @throws IllegalArgumentException if the criteria is null 041 */ 042 <T> GenericQueryResults<T> lookup(final Class<T> queryClass, final QueryByCriteria criteria); 043 044 /** 045 * Looks up a type based on a query criteria. 046 * 047 * @param queryClass the class to lookup 048 * @param criteria the criteria to lookup against. cannot be null. 049 * @param <T> the type that is being looked up. 050 * @return the results. will never be null. 051 * @throws IllegalArgumentException if the criteria is null 052 */ 053 <T> GenericQueryResults<T> lookup(final Class<T> queryClass, final QueryByCriteria criteria, LookupCustomizer<T> customizer); 054}