
Package ca.uhn.fhir.rest.param
Class TokenParam
- java.lang.Object
-
- ca.uhn.fhir.rest.param.BaseParam
-
- ca.uhn.fhir.rest.param.TokenParam
-
- All Implemented Interfaces:
IQueryParameterType
,Serializable
public class TokenParam extends BaseParam
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TokenParam()
ConstructorTokenParam(BaseCodingDt theCodingDt)
Constructor which copies thesystem
andcode
from aInternalCodingDt
instance and adds it as a parameterTokenParam(BaseIdentifierDt theIdentifierDt)
Constructor which copies thesystem
andvalue
from aBaseIdentifierDt
instance and adds it as a parameterTokenParam(String theCode)
Constructor that takes a code but no systemTokenParam(String theSystem, String theValue)
TokenParam(String theSystem, String theValue, boolean theText)
TokenParam(IBaseCoding theCoding)
Construct aTokenParam
from theIBaseCoding.getSystem()
() system} andIBaseCoding.getCode()
() code} of aIBaseCoding
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(Object theO)
TokenParamModifier
getModifier()
Returns the modifier for this tokenString
getSystem()
Returns the system for this token.String
getValue()
Returns the value for the token (generally the value to the right of the vertical bar on the URL)InternalCodingDt
getValueAsCoding()
String
getValueNotNull()
int
hashCode()
boolean
isEmpty()
boolean
isText()
Returns true ifgetModifier()
returnsTokenParamModifier.TEXT
TokenParam
setModifier(TokenParamModifier theModifier)
TokenParam
setSystem(String theSystem)
TokenParam
setText(boolean theText)
Deprecated.UsesetModifier(TokenParamModifier)
insteadTokenParam
setValue(String theValue)
String
toString()
-
Methods inherited from class ca.uhn.fhir.rest.param.BaseParam
getMissing, getQueryParameterQualifier, getValueAsQueryToken, isSupportsChain, setMissing, setValueAsQueryToken
-
-
-
-
Constructor Detail
-
TokenParam
public TokenParam()
Constructor
-
TokenParam
public TokenParam(BaseCodingDt theCodingDt)
Constructor which copies thesystem
andcode
from aInternalCodingDt
instance and adds it as a parameter- Parameters:
theCodingDt
- The coding
-
TokenParam
public TokenParam(BaseIdentifierDt theIdentifierDt)
Constructor which copies thesystem
andvalue
from aBaseIdentifierDt
instance and adds it as a parameter- Parameters:
theIdentifierDt
- The identifier
-
TokenParam
public TokenParam(IBaseCoding theCoding)
Construct aTokenParam
from theIBaseCoding.getSystem()
() system} andIBaseCoding.getCode()
() code} of aIBaseCoding
instance.- Parameters:
theCoding
- The coding
-
TokenParam
public TokenParam(String theSystem, String theValue)
-
TokenParam
public TokenParam(String theSystem, String theValue, boolean theText)
-
TokenParam
public TokenParam(String theCode)
Constructor that takes a code but no system
-
-
Method Detail
-
getModifier
public TokenParamModifier getModifier()
Returns the modifier for this token
-
setModifier
public TokenParam setModifier(TokenParamModifier theModifier)
-
getSystem
public String getSystem()
Returns the system for this token. Note that if agetModifier()
is being used, the entire value of the parameter will be placed invalue
and this method will returnnull
.null or
""
(empty string) and that each of these have a different meaning. When a token is passed on a URL and it has no vertical bar (often meaning "return values that match the given code in any codesystem") this method will returnnull
. When a token is passed on a URL and it has a vetical bar but nothing before the bar (often meaning "return values that match the given code but that have no codesystem) this method will return""
-
setSystem
public TokenParam setSystem(String theSystem)
-
getValue
public String getValue()
Returns the value for the token (generally the value to the right of the vertical bar on the URL)
-
setValue
public TokenParam setValue(String theValue)
-
getValueAsCoding
public InternalCodingDt getValueAsCoding()
-
getValueNotNull
public String getValueNotNull()
-
isEmpty
public boolean isEmpty()
-
isText
public boolean isText()
Returns true ifgetModifier()
returnsTokenParamModifier.TEXT
-
setText
@Deprecated public TokenParam setText(boolean theText)
Deprecated.UsesetModifier(TokenParamModifier)
instead
-
-