View Javadoc
1   package ca.uhn.fhir.rest.gclient;
2   
3   import ca.uhn.fhir.model.api.IQueryParameterType;
4   
5   import java.util.List;
6   import java.util.Map;
7   
8   /*
9    * #%L
10   * HAPI FHIR - Core Library
11   * %%
12   * Copyright (C) 2014 - 2018 University Health Network
13   * %%
14   * Licensed under the Apache License, Version 2.0 (the "License");
15   * you may not use this file except in compliance with the License.
16   * You may obtain a copy of the License at
17   * 
18   *      http://www.apache.org/licenses/LICENSE-2.0
19   * 
20   * Unless required by applicable law or agreed to in writing, software
21   * distributed under the License is distributed on an "AS IS" BASIS,
22   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23   * See the License for the specific language governing permissions and
24   * limitations under the License.
25   * #L%
26   */
27  
28  public interface IBaseQuery<T extends IBaseQuery<?>> {
29  
30  	/**
31  	 * Add a search parameter to the query.
32  	 * <p>
33  	 * Note that this method is a synonym for {@link #where(ICriterion)}, and is only
34  	 * here to make fluent queries read more naturally.
35  	 * </p>
36  	 */
37  	T and(ICriterion<?> theCriterion);
38  
39  	/**
40  	 * Add a set of search parameters to the query.
41  	 */
42  	T where(Map<String, List<IQueryParameterType>> theCriterion);
43  
44  	/**
45  	 * Add a search parameter to the query.
46  	 */
47  	T where(ICriterion<?> theCriterion);
48  
49  	/**
50  	 * Add a set of search parameters to the query.
51  	 * <p>
52  	 * Values will be treated semi-literally. No FHIR escaping will be performed
53  	 * on the values, but regular URL escaping will be.
54  	 * </p>
55  	 */
56  	T whereMap(Map<String, List<String>> theRawMap);
57  
58  }