@Component public class DateDatatype extends SerializingCustomDatatype<Date>
CustomDatatype.Summary
Constructor and Description |
---|
DateDatatype() |
Modifier and Type | Method and Description |
---|---|
Date |
deserialize(String serializedValue) |
CustomDatatype.Summary |
doGetTextSummary(Date typedValue)
Most implementations should override this method to return plain-text summary of the typed value, as defined
by
CustomDatatype.getTextSummary(String) . |
String |
serialize(Date typedValue) |
fromReferenceString, getReferenceStringForValue, getTextSummary, save, setConfiguration, validate
public CustomDatatype.Summary doGetTextSummary(Date typedValue)
SerializingCustomDatatype
CustomDatatype.getTextSummary(String)
. If SerializingCustomDatatype.deserialize(String)
is expensive, then the
implementation should override SerializingCustomDatatype.getTextSummary(String)
instead.
The default implementation returns typedValue.toString(), and indicates it is complete.doGetTextSummary
in class SerializingCustomDatatype<Date>
SerializingCustomDatatype.doGetTextSummary(java.lang.Object)
public Date deserialize(String serializedValue)
deserialize
in class SerializingCustomDatatype<Date>
Should reconstruct a date serialized by this handler
public String serialize(Date typedValue)
serialize
in class SerializingCustomDatatype<Date>
typedValue
- (has already had validate called)Should convert a date into a ymd string representation
Copyright © 2024 OpenMRS Inc.. All rights reserved.