Package ca.uhn.fhir.rest.param
Class ReferenceParam
- java.lang.Object
-
- ca.uhn.fhir.rest.param.ReferenceParam
-
- All Implemented Interfaces:
IQueryParameterType,Serializable
public class ReferenceParam extends Object
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ReferenceParam()ConstructorReferenceParam(String theValue)ConstructorReferenceParam(String theChain, String theValue)ConstructorReferenceParam(String theResourceType, String theChain, String theValue)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetBaseUrl()StringgetChain()StringgetIdPart()BigDecimalgetIdPartAsBigDecimal()LonggetIdPartAsLong()BooleangetMissing()If set to non-null value, indicates that this parameter has been populated with a "[name]:missing=true" or "[name]:missing=false" vale instead of a normal valueStringgetQueryParameterQualifier()This method will return any qualifier that should be appended to the parameter name (e.g ":exact").StringgetResourceType()Class<? extends IBaseResource>getResourceType(FhirContext theCtx)StringgetValue()StringgetValueAsQueryToken(FhirContext theContext)Returns a representation of this parameter's value as it will be represented "over the wire".booleanhasResourceType()booleanisIdPartValidLong()protected booleanisSupportsChain()Does this parameter type support chained parameters (only reference should returntruefor this)ReferenceParamsetChain(String theChain)ca.uhn.fhir.rest.param.BaseParamsetMissing(Boolean theMissing)If set to non-null value, indicates that this parameter has been populated with a "[name]:missing=true" or "[name]:missing=false" vale instead of a normal valueReferenceParamsetValue(String theValue)voidsetValueAsQueryToken(FhirContext theContext, String theParamName, String theQualifier, String theValue)This method is generally only called by HAPI itself, and should not need to be called from user code.DateParamtoDateParam(FhirContext theContext)Returns a new param containing the same value as this param, but with the type copnverted toDateParam.NumberParamtoNumberParam(FhirContext theContext)Returns a new param containing the same value as this param, but with the type copnverted toNumberParam.QuantityParamtoQuantityParam(FhirContext theContext)Returns a new param containing the same value as this param, but with the type copnverted toQuantityParam.StringtoString()StringParamtoStringParam(FhirContext theContext)Returns a new param containing the same value as this param, but with the type copnverted toStringParam.TokenParamtoTokenParam(FhirContext theContext)Returns a new param containing the same value as this param, but with the type copnverted toTokenParam.
-
-
-
Constructor Detail
-
ReferenceParam
public ReferenceParam()
Constructor
-
ReferenceParam
public ReferenceParam(String theValue)
Constructor
-
ReferenceParam
public ReferenceParam(String theChain, String theValue)
Constructor
-
ReferenceParam
public ReferenceParam(String theResourceType, String theChain, String theValue)
Constructor
-
-
Method Detail
-
getBaseUrl
public String getBaseUrl()
-
setChain
public ReferenceParam setChain(String theChain)
-
getIdPartAsBigDecimal
public BigDecimal getIdPartAsBigDecimal()
-
getIdPartAsLong
public Long getIdPartAsLong()
-
getResourceType
public String getResourceType()
-
getResourceType
public Class<? extends IBaseResource> getResourceType(FhirContext theCtx)
-
setValue
public ReferenceParam setValue(String theValue)
-
hasResourceType
public boolean hasResourceType()
-
isSupportsChain
protected boolean isSupportsChain()
Does this parameter type support chained parameters (only reference should returntruefor this)
-
toDateParam
public DateParam toDateParam(FhirContext theContext)
Returns a new param containing the same value as this param, but with the type copnverted toDateParam. This is useful if you are using reference parameters and want to handle chained parameters of different types in a single method.See Dynamic Chains in the HAPI FHIR documentation for an example of how to use this method.
-
toNumberParam
public NumberParam toNumberParam(FhirContext theContext)
Returns a new param containing the same value as this param, but with the type copnverted toNumberParam. This is useful if you are using reference parameters and want to handle chained parameters of different types in a single method.See Dynamic Chains in the HAPI FHIR documentation for an example of how to use this method.
-
toQuantityParam
public QuantityParam toQuantityParam(FhirContext theContext)
Returns a new param containing the same value as this param, but with the type copnverted toQuantityParam. This is useful if you are using reference parameters and want to handle chained parameters of different types in a single method.See Dynamic Chains in the HAPI FHIR documentation for an example of how to use this method.
-
toStringParam
public StringParam toStringParam(FhirContext theContext)
Returns a new param containing the same value as this param, but with the type copnverted toStringParam. This is useful if you are using reference parameters and want to handle chained parameters of different types in a single method.See Dynamic Chains in the HAPI FHIR documentation for an example of how to use this method.
-
toTokenParam
public TokenParam toTokenParam(FhirContext theContext)
Returns a new param containing the same value as this param, but with the type copnverted toTokenParam. This is useful if you are using reference parameters and want to handle chained parameters of different types in a single method.See Dynamic Chains in the HAPI FHIR documentation for an example of how to use this method.
-
isIdPartValidLong
public boolean isIdPartValidLong()
-
getMissing
public Boolean getMissing()
If set to non-null value, indicates that this parameter has been populated with a "[name]:missing=true" or "[name]:missing=false" vale instead of a normal value- Specified by:
getMissingin interfaceIQueryParameterType
-
getQueryParameterQualifier
public final String getQueryParameterQualifier()
Description copied from interface:IQueryParameterTypeThis method will return any qualifier that should be appended to the parameter name (e.g ":exact"). Returns null if none are present.- Specified by:
getQueryParameterQualifierin interfaceIQueryParameterType
-
getValueAsQueryToken
public final String getValueAsQueryToken(FhirContext theContext)
Description copied from interface:IQueryParameterTypeReturns a representation of this parameter's value as it will be represented "over the wire". In other words, how it will be presented in a URL (although not URL escaped)See FHIR specification 2.2.2 Search SearchParameter Types for information on the token format
- Specified by:
getValueAsQueryTokenin interfaceIQueryParameterType- Parameters:
theContext- TODO- Returns:
- Returns a representation of this parameter's value as it will be represented "over the wire". In other words, how it will be presented in a URL (although not URL escaped)
-
setMissing
public ca.uhn.fhir.rest.param.BaseParam setMissing(Boolean theMissing)
If set to non-null value, indicates that this parameter has been populated with a "[name]:missing=true" or "[name]:missing=false" vale instead of a normal value- Specified by:
setMissingin interfaceIQueryParameterType- Returns:
- Returns a reference to
thisfor easier method chaining
-
setValueAsQueryToken
public final void setValueAsQueryToken(FhirContext theContext, String theParamName, String theQualifier, String theValue)
Description copied from interface:IQueryParameterTypeThis method is generally only called by HAPI itself, and should not need to be called from user code.See FHIR specification 2.2.2 Search SearchParameter Types for information on the token format
- Specified by:
setValueAsQueryTokenin interfaceIQueryParameterType- Parameters:
theContext- TODOtheParamName- TODOtheQualifier- The parameter name qualifier that accompanied this value. For example, if the complete query washttp://foo?name:exact=John, qualifier would be ":exact"theValue- The actual parameter value. For example, if the complete query washttp://foo?name:exact=John, the value would be "John"
-
-