Package ca.uhn.fhir.model.primitive
Class StringDt
- All Implemented Interfaces:
IDatatype
,IElement
,IIdentifiableElement
,IPrimitiveDatatype<String>
,IQueryParameterType
,ISupportsUndeclaredExtensions
,Externalizable
,Serializable
,IBase
,IBaseDatatype
,IPrimitiveType<String>
- Direct Known Subclasses:
MarkdownDt
,TimeDt
public class StringDt extends BasePrimitive<String> implements IQueryParameterType
- See Also:
- Serialized Form
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description protected String
encode(String theValue)
Subclasses must override to convert a "coerced" value into an encoded one.boolean
equals(Object obj)
Boolean
getMissing()
Deprecated.get/setMissing is not supported in StringDt.String
getQueryParameterQualifier()
This method will return any qualifier that should be appended to the parameter name (e.g ":exact").String
getValueAsQueryToken(FhirContext theContext)
Returns a representation of this parameter's value as it will be represented "over the wire".String
getValueNotNull()
int
hashCode()
boolean
isEmpty()
Returnstrue
if this datatype has no extensions, and has either anull
value or an empty ("") value.protected String
parse(String theValue)
Subclasses must override to convert an encoded representation of this datatype into a "coerced" oneIQueryParameterType
setMissing(Boolean theMissing)
Deprecated.get/setMissing is not supported in StringDt.void
setValueAsQueryToken(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.String
toString()
Returns the value of this string, ornull
Methods inherited from class ca.uhn.fhir.model.api.BasePrimitive
getValue, getValueAsString, hasValue, readExternal, setValue, setValueAsString, updateStringValue, writeExternal
Methods inherited from class ca.uhn.fhir.model.api.BaseIdentifiableElement
getElementSpecificId, getId, setElementSpecificId, setId, setId
Methods inherited from class ca.uhn.fhir.model.api.BaseElement
addUndeclaredExtension, addUndeclaredExtension, addUndeclaredExtension, getAllUndeclaredExtensions, getFormatCommentsPost, getFormatCommentsPre, getUndeclaredExtensions, getUndeclaredExtensionsByUrl, getUndeclaredModifierExtensions, getUserData, hasFormatComment, isBaseEmpty, setUserData
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.hl7.fhir.instance.model.api.IBase
fhirType, getFormatCommentsPost, getFormatCommentsPre, getUserData, hasFormatComment, setUserData
-
Constructor Details
-
StringDt
public StringDt()Create a new String -
StringDt
Create a new String
-
-
Method Details
-
getValueNotNull
-
toString
Returns the value of this string, ornull
- Overrides:
toString
in classBasePrimitive<String>
-
hashCode
- Overrides:
hashCode
in classBasePrimitive<String>
-
equals
- Overrides:
equals
in classBasePrimitive<String>
-
setValueAsQueryToken
public void setValueAsQueryToken(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.See FHIR specification 2.2.2 Search SearchParameter Types for information on the token format
- Specified by:
setValueAsQueryToken
in 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"
-
getValueAsQueryToken
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)See FHIR specification 2.2.2 Search SearchParameter Types for information on the token format
- Specified by:
getValueAsQueryToken
in 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)
-
isEmpty
Returnstrue
if this datatype has no extensions, and has either anull
value or an empty ("") value.- Specified by:
isEmpty
in interfaceIBase
- Overrides:
isEmpty
in classBasePrimitive<String>
-
getQueryParameterQualifier
Description copied from interface:IQueryParameterType
This method will return any qualifier that should be appended to the parameter name (e.g ":exact"). Returns null if none are present.- Specified by:
getQueryParameterQualifier
in interfaceIQueryParameterType
-
parse
Description copied from class:BasePrimitive
Subclasses must override to convert an encoded representation of this datatype into a "coerced" one- Specified by:
parse
in classBasePrimitive<String>
- Parameters:
theValue
- Will not be null- Returns:
- May return null if the value does not correspond to anything
-
encode
Description copied from class:BasePrimitive
Subclasses must override to convert a "coerced" value into an encoded one.- Specified by:
encode
in classBasePrimitive<String>
- Parameters:
theValue
- Will not be null- Returns:
- May return null if the value does not correspond to anything
-
getMissing
Deprecated.get/setMissing is not supported in StringDt. UseStringParam
instead if you need this functionalityNot supported!- Specified by:
getMissing
in interfaceIQueryParameterType
-
setMissing
Deprecated.get/setMissing is not supported in StringDt. UseStringParam
instead if you need this functionalityNot supported!- Specified by:
setMissing
in interfaceIQueryParameterType
- Returns:
- Returns a reference to
this
for easier method chaining
-