View Javadoc
1   /**
2    * Copyright 2012 The Kuali Foundation Licensed under the
3    * Educational Community License, Version 2.0 (the "License"); you may
4    * not use this file except in compliance with the License. You may
5    * obtain a copy of the License at
6    *
7    * http://www.osedu.org/licenses/ECL-2.0
8    *
9    * Unless required by applicable law or agreed to in writing,
10   * software distributed under the License is distributed on an "AS IS"
11   * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12   * or implied. See the License for the specific language governing
13   * permissions and limitations under the License.
14   *
15   */
16  package org.kuali.student.enrollment.class2.courseoffering.service.impl;
17  
18  import org.kuali.rice.core.api.criteria.GenericQueryResults;
19  import org.kuali.rice.core.api.criteria.QueryByCriteria;
20  import org.kuali.student.common.mock.MockService;
21  import org.kuali.student.r2.common.criteria.CriteriaLookupService;
22  import org.kuali.student.r2.common.criteria.LookupCustomizer;
23  
24  import java.util.ArrayList;
25  import java.util.List;
26  
27  /**
28   * This class provides a mock implementation of the CriteriaLookupService
29   *
30   * @author Kuali Student Team
31   */
32  public class CriteriaLookupServiceMockImpl implements CriteriaLookupService,
33          MockService {
34      @Override
35      public <T> GenericQueryResults<T> lookup(Class<T> queryClass, QueryByCriteria criteria) {
36          GenericQueryResults.Builder<T> results = GenericQueryResults.Builder.<T>create();
37          results.setTotalRowCount(0);
38          results.setResults(new ArrayList<T>());
39          return results.build();
40      }
41  
42      @Override
43      public <T> GenericQueryResults<T> lookup(Class<T> queryClass, QueryByCriteria criteria, LookupCustomizer<T> customizer) {
44          GenericQueryResults.Builder<T> results = GenericQueryResults.Builder.<T>create();
45          results.setTotalRowCount(0);
46          results.setResults(new ArrayList<T>());
47          return results.build();
48      }
49  
50      @Override
51      public void clear() {
52          //To change body of implemented methods use File | Settings | File Templates.
53      }
54  
55      @Override
56      public <T> GenericQueryResults<String> lookupIds(Class<T> queryClass, QueryByCriteria criteria) {
57  
58          return null;
59      }
60  
61      @Override
62      public <T> GenericQueryResults<String> lookupIds(Class<T> queryClass, QueryByCriteria criteria, LookupCustomizer<T> customizer) {
63  
64          return null;
65      }
66  
67      @Override
68      public <T> GenericQueryResults<List<String>> genericLookup(final Class<T> queryClass, final QueryByCriteria criteria, List<String> fields){
69          return null;
70      }
71  
72      @Override
73      public <T> GenericQueryResults<List<String>> genericLookup(final Class<T> queryClass, final QueryByCriteria criteria, final LookupCustomizer<T> customizer, List<String> fields){
74          return null;
75  
76      }
77  
78  }