Package com.ibm.fhir.client
Class FHIRParameters
- java.lang.Object
-
- com.ibm.fhir.client.FHIRParameters
-
public class FHIRParameters extends java.lang.ObjectThis 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(java.lang.String name, java.lang.String value)Adds a multi-valued parameter to 'this'.voidaddSinglevaluedParameter(java.lang.String name, java.lang.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(java.lang.String mimeType)Convenience method which sets the "_format" query parameter.javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.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(java.lang.String name, java.lang.String value)Adds the specified query parameter name and value to 'this'.java.lang.StringqueryString()java.lang.StringqueryString(boolean includeSeparator)This method returns the parameters contained in 'this' in the form of a query string.FHIRParameterssearchParam(java.lang.String name, FHIRParameters.Modifier modifier, java.lang.String... values)Adds the specified search parameter (name, modifier, values) to 'this'.FHIRParameterssearchParam(java.lang.String name, FHIRParameters.ValuePrefix prefix, java.lang.String... values)Adds the specified search parameter (name, value-prefix, values) to 'this'.FHIRParameterssearchParam(java.lang.String name, ResourceType resourceType, java.lang.String... values)Adds the specified search parameter (name, resourceType, values) to 'this'.FHIRParameterssearchParam(java.lang.String name, java.lang.String... values)Adds the specified search parameter name and values to 'this'.FHIRParameterssince(java.lang.String since)Convenience method which sets the "_since" query parameter.java.lang.StringtoString()This method returns a string representation of the FHIRParameters object.
-
-
-
Field Detail
-
COUNT
public static final java.lang.String COUNT
Constants which define common parameter names.- See Also:
- Constant Field Values
-
FORMAT
public static final java.lang.String FORMAT
- See Also:
- Constant Field Values
-
PAGE
public static final java.lang.String PAGE
- See Also:
- Constant Field Values
-
SINCE
public static final java.lang.String SINCE
- See Also:
- Constant Field Values
-
-
Method Detail
-
format
public FHIRParameters format(java.lang.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(java.lang.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(java.lang.String name, java.lang.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(java.lang.String name, FHIRParameters.Modifier modifier, java.lang.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(java.lang.String name, ResourceType resourceType, java.lang.String... values)
Adds the specified search parameter (name, resourceType, values) to 'this'.- Parameters:
name- the parameter nameresourceType- a resource type (e.g. Patient) as a modifiervalues- one or more values associated with the search parameter- Returns:
- a handle to the FHIRParameters object
-
searchParam
public FHIRParameters searchParam(java.lang.String name, FHIRParameters.ValuePrefix prefix, java.lang.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(java.lang.String name, java.lang.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- Returns:
- handle to the FHIRParameters object
-
getParameterMap
public final javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.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(java.lang.String name, java.lang.String value)Adds a multi-valued parameter to 'this'.
-
addSinglevaluedParameter
public void addSinglevaluedParameter(java.lang.String name, java.lang.String value)Adds a single-valued parameter to 'this'.- Parameters:
name-value-
-
queryString
public java.lang.String queryString(boolean includeSeparator)
This method returns the parameters contained in 'this' in the form of a query string.
-
queryString
public java.lang.String queryString()
-
toString
public java.lang.String toString()
This method returns a string representation of the FHIRParameters object.- Overrides:
toStringin classjava.lang.Object
-
-