
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
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringSubclasses must override to convert a "coerced" value into an encoded one.booleanDeprecated.get/setMissing is not supported in StringDt.This method will return any qualifier that should be appended to the parameter name (e.g ":exact").Returns a representation of this parameter's value as it will be represented "over the wire".inthashCode()booleanisEmpty()Returnstrueif this datatype has no extensions, and has either anullvalue or an empty ("") value.protected StringSubclasses must override to convert an encoded representation of this datatype into a "coerced" onesetMissing(Boolean theMissing) Deprecated.get/setMissing is not supported in StringDt.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.toString()Returns the value of this string, ornullMethods inherited from class ca.uhn.fhir.model.api.BasePrimitive
getValue, getValueAsString, hasValue, readExternal, setValue, setValueAsString, updateStringValue, writeExternalMethods inherited from class ca.uhn.fhir.model.api.BaseIdentifiableElement
getElementSpecificId, getId, setElementSpecificId, setId, setIdMethods inherited from class ca.uhn.fhir.model.api.BaseElement
addUndeclaredExtension, addUndeclaredExtension, addUndeclaredExtension, getAllUndeclaredExtensions, getFormatCommentsPost, getFormatCommentsPre, getUndeclaredExtensions, getUndeclaredExtensionsByUrl, getUndeclaredModifierExtensions, getUserData, hasFormatComment, isBaseEmpty, setUserDataMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.hl7.fhir.instance.model.api.IBase
fhirType, getFormatCommentsPost, getFormatCommentsPre, getUserData, hasFormatComment, setUserDataMethods inherited from interface ca.uhn.fhir.model.api.IQueryParameterType
getValueAsQueryToken
-
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:
toStringin classBasePrimitive<String>
-
hashCode
- Overrides:
hashCodein classBasePrimitive<String>
-
equals
- Overrides:
equalsin 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:
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"
-
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:
getValueAsQueryTokenin interfaceIQueryParameterType- 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
Returnstrueif this datatype has no extensions, and has either anullvalue or an empty ("") value.- Specified by:
isEmptyin interfaceIBase- Specified by:
isEmptyin interfaceIQueryParameterType- Overrides:
isEmptyin classBasePrimitive<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
-
parse
Description copied from class:BasePrimitiveSubclasses must override to convert an encoded representation of this datatype into a "coerced" one- Specified by:
parsein 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:BasePrimitiveSubclasses must override to convert a "coerced" value into an encoded one.- Specified by:
encodein 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. UseStringParaminstead if you need this functionalityNot supported!- Specified by:
getMissingin interfaceIQueryParameterType
-
setMissing
Deprecated.get/setMissing is not supported in StringDt. UseStringParaminstead if you need this functionalityNot supported!- Specified by:
setMissingin interfaceIQueryParameterType- Returns:
- Returns a reference to
thisfor easier method chaining
-