Package com.ibm.fhir.client
Class FHIRParameters
- java.lang.Object
 - 
- com.ibm.fhir.client.FHIRParameters
 
 
- 
public class FHIRParameters extends Object
This class is used as a container for request parameters associated with a FHIR Client API request. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFHIRParameters.ModifierThe valid set of modifiers that can be used when constructing the parameters for a search operation.static classFHIRParameters.ValuePrefixThe valid set of value prefixes that can be used when constructing the parameters for a search operation. 
- 
Constructor Summary
Constructors Constructor Description FHIRParameters() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMultivaluedParameter(String name, String value)Adds a multi-valued parameter to 'this'.voidaddSinglevaluedParameter(String name, String value)Adds a single-valued parameter to 'this'.FHIRParametersclear()Clears the set of parameters currently contained in the FHIRParameters object.FHIRParameterscount(int count)Convenience method which sets the "_count" query parameter.FHIRParametersformat(String mimeType)Convenience method which sets the "_format" query parameter.javax.ws.rs.core.MultivaluedMap<String,String>getParameterMap()Returns the collection of parameters that have been added to 'this'.FHIRParameterspage(int page)Convenience method which sets the "_page" query parameter.FHIRParametersqueryParam(String name, String value)Adds the specified query parameter name and value to 'this'.StringqueryString()StringqueryString(boolean includeSeparator)This method returns the parameters contained in 'this' in the form of a query string.FHIRParameterssearchParam(String name, FHIRParameters.Modifier modifier, String... values)Adds the specified search parameter (name, modifier, values) to 'this'.FHIRParameterssearchParam(String name, FHIRParameters.ValuePrefix prefix, String... values)Adds the specified search parameter (name, value-prefix, values) to 'this'.FHIRParameterssearchParam(String name, String... values)Adds the specified search parameter name and values to 'this'.FHIRParameterssince(String since)Convenience method which sets the "_since" query parameter.StringtoString()This method returns a string representation of the FHIRParameters object. 
 - 
 
- 
- 
Field Detail
- 
COUNT
public static final String COUNT
Constants which define common parameter names.- See Also:
 - Constant Field Values
 
 
- 
FORMAT
public static final String FORMAT
- See Also:
 - Constant Field Values
 
 
- 
PAGE
public static final String PAGE
- See Also:
 - Constant Field Values
 
 
- 
SINCE
public static final String SINCE
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
format
public FHIRParameters format(String mimeType)
Convenience method which sets the "_format" query parameter.- Parameters:
 mimeType- the mimeType to use for the request- Returns:
 - a handle to the FHIRParameters object
 
 
- 
count
public FHIRParameters count(int count)
Convenience method which sets the "_count" query parameter.- Parameters:
 count- the count value to use for the request- Returns:
 - a handle to the FHIRParameters object
 
 
- 
page
public FHIRParameters page(int page)
Convenience method which sets the "_page" query parameter.- Parameters:
 page- the page number to use for the request- Returns:
 - a handle to the FHIRParameters object
 
 
- 
since
public FHIRParameters since(String since)
Convenience method which sets the "_since" query parameter.- Parameters:
 since- a string representing the "since" date value to use for the request- Returns:
 - a handle to the FHIRParameters object
 
 
- 
clear
public FHIRParameters clear()
Clears the set of parameters currently contained in the FHIRParameters object.- Returns:
 - a handle to the FHIRParameters object
 
 
- 
queryParam
public FHIRParameters queryParam(String name, String value)
Adds the specified query parameter name and value to 'this'.- Parameters:
 name- the parameter namevalue- the parameter value- Returns:
 - a handle to the FHIRParameters object
 
 
- 
searchParam
public FHIRParameters searchParam(String name, FHIRParameters.Modifier modifier, String... values)
Adds the specified search parameter (name, modifier, values) to 'this'.- Parameters:
 name- the parameter namemodifier- a modifier (e.g. CONTAINS)values- one or more values associated with the search parameter- Returns:
 - a handle to the FHIRParameters object
 
 
- 
searchParam
public FHIRParameters searchParam(String name, FHIRParameters.ValuePrefix prefix, String... values)
Adds the specified search parameter (name, value-prefix, values) to 'this'.- Parameters:
 name- the parameter nameprefix- a value prefix (e.g. LE) to be applied to the valuesvalues- one or more values associated with the search parameter- Returns:
 - a handle to the FHIRParameters object
 
 
- 
searchParam
public FHIRParameters searchParam(String name, String... values)
Adds the specified search parameter name and values to 'this'.- Parameters:
 name- the name of the search parametervalues- one or more values to be associated with the search parameter
 
- 
getParameterMap
public final javax.ws.rs.core.MultivaluedMap<String,String> getParameterMap()
Returns the collection of parameters that have been added to 'this'.- Returns:
 - a MultivalueMap where the key (query parameter name) maps to a list of string values
 
 
- 
addMultivaluedParameter
public void addMultivaluedParameter(String name, String value)
Adds a multi-valued parameter to 'this'. 
- 
addSinglevaluedParameter
public void addSinglevaluedParameter(String name, String value)
Adds a single-valued parameter to 'this'.- Parameters:
 name-value-
 
- 
queryString
public String queryString(boolean includeSeparator)
This method returns the parameters contained in 'this' in the form of a query string. 
- 
queryString
public String queryString()
 
 - 
 
 -