View Javadoc
1   package ca.uhn.fhir.model.api;
2   
3   import java.io.Serializable;
4   
5   import ca.uhn.fhir.context.FhirContext;
6   
7   /*
8    * #%L
9    * HAPI FHIR - Core Library
10   * %%
11   * Copyright (C) 2014 - 2018 University Health Network
12   * %%
13   * Licensed under the Apache License, Version 2.0 (the "License");
14   * you may not use this file except in compliance with the License.
15   * You may obtain a copy of the License at
16   * 
17   *      http://www.apache.org/licenses/LICENSE-2.0
18   * 
19   * Unless required by applicable law or agreed to in writing, software
20   * distributed under the License is distributed on an "AS IS" BASIS,
21   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22   * See the License for the specific language governing permissions and
23   * limitations under the License.
24   * #L%
25   */
26  
27  public interface IQueryParameterType extends Serializable {
28  
29  	/**
30  	 * This method is generally only called by HAPI itself, and should not need to be called from user code. 
31  	 * 
32  	 * <p>
33  	 * See FHIR specification <a href="http://www.hl7.org/implement/standards/fhir/search.html#ptypes">2.2.2 Search
34  	 * SearchParameter Types</a> for information on the <b>token</b> format
35  	 * </p>
36  	 * @param theContext TODO
37  	 * @param theParamName TODO
38  	 * @param theQualifier
39  	 *            The parameter name qualifier that accompanied this value. For example, if the complete query was
40  	 *            <code>http://foo?name:exact=John</code>, qualifier would be ":exact"
41  	 * @param theValue
42  	 *            The actual parameter value. For example, if the complete query was
43  	 *            <code>http://foo?name:exact=John</code>, the value would be "John"
44  	 */
45  	public void setValueAsQueryToken(FhirContext theContext, String theParamName, String theQualifier, String theValue);
46  
47  	/**
48  	 * Returns a representation of this parameter's value as it will be represented "over the wire". In other
49  	 * words, how it will be presented in a URL (although not URL escaped) 
50  	 * 
51  	 * <p>
52  	 * See FHIR specification <a href="http://www.hl7.org/implement/standards/fhir/search.html#ptypes">2.2.2 Search
53  	 * SearchParameter Types</a> for information on the <b>token</b> format
54  	 * </p>
55  	 * @param theContext TODO
56  	 * 
57  	 * @return Returns a representation of this parameter's value as it will be represented "over the wire". In other
58  	 * words, how it will be presented in a URL (although not URL escaped) 
59  	 */
60  	public String getValueAsQueryToken(FhirContext theContext);
61  	
62  	/**
63  	 * This method will return any qualifier that should be appended to the parameter name (e.g ":exact")
64  	 */
65  	public String getQueryParameterQualifier();
66  
67  	/**
68  	 * If set to non-null value, indicates that this parameter has been populated with a "[name]:missing=true" or "[name]:missing=false" vale 
69  	 * instead of a normal value 
70  	 */
71  	Boolean getMissing();
72  
73  	/**
74  	 * If set to non-null value, indicates that this parameter has been populated with a "[name]:missing=true" or "[name]:missing=false" vale 
75  	 * instead of a normal value
76  	 *  
77  	 * @return Returns a reference to <code>this</code> for easier method chaining
78  	 */
79  	IQueryParameterType setMissing(Boolean theMissing);
80  
81  }