View Javadoc
1   /**
2    * Copyright 2005-2016 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 org.kuali.rice.core.api.criteria;
17  
18  /**
19   * @deprecated use new KRAD Data framework {@link org.kuali.rice.krad.data.DataObjectService}
20   */
21  @Deprecated
22  public interface CriteriaLookupService {
23  
24      /**
25       * Looks up a type based on a query criteria.
26       *
27       * @param queryClass the class to lookup
28       * @param criteria the criteria to lookup against. cannot be null.
29       * @param <T> the type that is being looked up.
30       * @return the results. will never be null.
31       * @throws IllegalArgumentException if the criteria is null
32       */
33      <T> GenericQueryResults<T> lookup(final Class<T> queryClass, final QueryByCriteria criteria);
34  
35      /**
36       * Looks up a type based on a query criteria.
37       *
38       * @param queryClass the class to lookup
39       * @param criteria the criteria to lookup against. cannot be null.
40       * @param <T> the type that is being looked up.
41       * @return the results. will never be null.
42       * @throws IllegalArgumentException if the criteria is null
43       */
44      <T> GenericQueryResults<T> lookup(final Class<T> queryClass, final QueryByCriteria criteria, final LookupCustomizer<T> customizer);
45  }