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