001/* 002 * #%L 003 * HAPI FHIR - Core Library 004 * %% 005 * Copyright (C) 2014 - 2024 Smile CDR, Inc. 006 * %% 007 * Licensed under the Apache License, Version 2.0 (the "License"); 008 * you may not use this file except in compliance with the License. 009 * You may obtain a copy of the License at 010 * 011 * http://www.apache.org/licenses/LICENSE-2.0 012 * 013 * Unless required by applicable law or agreed to in writing, software 014 * distributed under the License is distributed on an "AS IS" BASIS, 015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 016 * See the License for the specific language governing permissions and 017 * limitations under the License. 018 * #L% 019 */ 020package ca.uhn.fhir.rest.gclient; 021 022import ca.uhn.fhir.model.api.IQueryParameterType; 023 024import java.util.List; 025import java.util.Map; 026 027public interface IBaseQuery<T extends IBaseQuery<?>> { 028 029 /** 030 * Add a search parameter to the query. 031 * <p> 032 * Note that this method is a synonym for {@link #where(ICriterion)}, and is only 033 * here to make fluent queries read more naturally. 034 * </p> 035 */ 036 T and(ICriterion<?> theCriterion); 037 038 /** 039 * Add a set of search parameters to the query. 040 * 041 * Note that the entries of the map are extracted immediately upon invoking this method. Changes made to the 042 * map afterward will not be reflected in the actual search. 043 */ 044 T where(Map<String, List<IQueryParameterType>> theCriterion); 045 046 /** 047 * Add a search parameter to the query. 048 */ 049 T where(ICriterion<?> theCriterion); 050 051 /** 052 * Add a set of search parameters to the query. 053 * <p> 054 * Values will be treated semi-literally. No FHIR escaping will be performed 055 * on the values, but regular URL escaping will be. 056 * </p> 057 */ 058 T whereMap(Map<String, List<String>> theRawMap); 059}