public class DateTimeDatatype extends java.lang.Object implements Datatype<java.util.Date>, ParameterizedDatatype, TimeZoneAwareDatatype
Modifier and Type | Field and Description |
---|---|
protected FormatStringsRegistry |
formatStringsRegistry |
Constructor and Description |
---|
DateTimeDatatype() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
format(java.lang.Object value)
Converts value to String.
|
java.lang.String |
format(java.lang.Object value,
java.util.Locale locale)
Converts value to String taking into account local formats.
|
java.lang.String |
format(java.lang.Object value,
java.util.Locale locale,
java.util.TimeZone timeZone)
Converts value to String taking into account local formats and timezone.
|
java.util.Map<java.lang.String,java.lang.Object> |
getParameters() |
java.util.Date |
parse(java.lang.String value)
Parses value from String
|
java.util.Date |
parse(java.lang.String value,
java.util.Locale locale)
Parses value from String taking into account local formats
|
java.util.Date |
parse(java.lang.String value,
java.util.Locale locale,
java.util.TimeZone timeZone) |
void |
setFormatStringsRegistry(FormatStringsRegistry formatStringsRegistry) |
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getId, getJavaClass
protected FormatStringsRegistry formatStringsRegistry
@Autowired public void setFormatStringsRegistry(FormatStringsRegistry formatStringsRegistry)
public java.lang.String format(@Nullable java.lang.Object value)
Datatype
public java.lang.String format(@Nullable java.lang.Object value, java.util.Locale locale)
Datatype
public java.lang.String format(@Nullable java.lang.Object value, java.util.Locale locale, @Nullable java.util.TimeZone timeZone)
TimeZoneAwareDatatype
format
in interface TimeZoneAwareDatatype
public java.util.Date parse(@Nullable java.lang.String value) throws java.text.ParseException
Datatype
public java.util.Date parse(@Nullable java.lang.String value, java.util.Locale locale) throws java.text.ParseException
Datatype
@Nullable public java.util.Date parse(@Nullable java.lang.String value, java.util.Locale locale, @Nullable java.util.TimeZone timeZone) throws java.text.ParseException
java.text.ParseException
public java.util.Map<java.lang.String,java.lang.Object> getParameters()
getParameters
in interface ParameterizedDatatype
public java.lang.String toString()
toString
in class java.lang.Object