001package ca.uhn.fhir.model.api;
002
003
004/*
005 * #%L
006 * HAPI FHIR - Core Library
007 * %%
008 * Copyright (C) 2014 - 2016 University Health Network
009 * %%
010 * Licensed under the Apache License, Version 2.0 (the "License");
011 * you may not use this file except in compliance with the License.
012 * You may obtain a copy of the License at
013 * 
014 *      http://www.apache.org/licenses/LICENSE-2.0
015 * 
016 * Unless required by applicable law or agreed to in writing, software
017 * distributed under the License is distributed on an "AS IS" BASIS,
018 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
019 * See the License for the specific language governing permissions and
020 * limitations under the License.
021 * #L%
022 */
023
024public interface IQueryParameterType {
025
026        /**
027         * This method is generally only called by HAPI itself, and should not need to be called from user code. 
028         * 
029         * <p>
030         * See FHIR specification <a href="http://www.hl7.org/implement/standards/fhir/search.html#ptypes">2.2.2 Search
031         * SearchParameter Types</a> for information on the <b>token</b> format
032         * </p>
033         * 
034         * @param theQualifier
035         *            The parameter name qualifier that accompanied this value. For example, if the complete query was
036         *            <code>http://foo?name:exact=John</code>, qualifier would be ":exact"
037         * @param theValue
038         *            The actual parameter value. For example, if the complete query was
039         *            <code>http://foo?name:exact=John</code>, the value would be "John"
040         */
041        public void setValueAsQueryToken(String theQualifier, String theValue);
042
043        /**
044         * Returns a representation of this parameter's value as it will be represented "over the wire". In other
045         * words, how it will be presented in a URL (although not URL escaped) 
046         * 
047         * <p>
048         * See FHIR specification <a href="http://www.hl7.org/implement/standards/fhir/search.html#ptypes">2.2.2 Search
049         * SearchParameter Types</a> for information on the <b>token</b> format
050         * </p>
051         * 
052         * @return Returns a representation of this parameter's value as it will be represented "over the wire". In other
053         * words, how it will be presented in a URL (although not URL escaped) 
054         */
055        public String getValueAsQueryToken();
056        
057        /**
058         * This method will return any qualifier that should be appended to the parameter name (e.g ":exact")
059         */
060        public String getQueryParameterQualifier();
061
062        /**
063         * If set to non-null value, indicates that this parameter has been populated with a "[name]:missing=true" or "[name]:missing=false" vale 
064         * instead of a normal value 
065         */
066        Boolean getMissing();
067
068        /**
069         * If set to non-null value, indicates that this parameter has been populated with a "[name]:missing=true" or "[name]:missing=false" vale 
070         * instead of a normal value 
071         */
072        void setMissing(Boolean theMissing);
073
074}