public abstract class TemporalAccessConverter<T extends java.time.temporal.Temporal> extends DefaultObjectConverter<T>
ObjectConverter for all the data types that extends <code>TemporalAccessor</code>.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PROPERTY_DATE_TIME_FORMATTER
A property for the converter context.
|
| Constructor and Description |
|---|
TemporalAccessConverter()
Creates a TemporalConverter.
|
| Modifier and Type | Method and Description |
|---|---|
java.time.format.DateTimeFormatter |
getDefaultDateTimeFormatter()
Gets the default DateTimeFormatter to format/parse the LocalDate.
|
protected abstract java.time.format.DateTimeFormatter |
getFullDateTimeFormatter() |
protected abstract java.time.format.DateTimeFormatter |
getLongDateTimeFormatter() |
protected abstract java.time.format.DateTimeFormatter |
getMediumDateTimeFormatter() |
protected abstract java.time.format.DateTimeFormatter |
getShortDateTimeFormatter() |
void |
setDefaultDateTimeFormatter(java.time.format.DateTimeFormatter defaultFormat)
Sets the default DateTimeFormatter to format/parse the LocalDate.
|
java.time.temporal.TemporalAccessor |
temporalFromString(java.lang.String string,
ConverterContext context)
Converts from a String to a TemporalAccess.
|
java.lang.String |
toString(T value,
ConverterContext context)
Converts the LocalDate to String.
|
fromString, fromString, getObjectConverterManager, toString, toStringConverterpublic static final java.lang.String PROPERTY_DATE_TIME_FORMATTER
public TemporalAccessConverter()
public java.lang.String toString(T value, ConverterContext context)
toString in interface ObjectConverter<T extends java.time.temporal.Temporal>toString in class DefaultObjectConverter<T extends java.time.temporal.Temporal>value - the LocalDate to be convertedcontext - the converter context.public java.time.temporal.TemporalAccessor temporalFromString(java.lang.String string,
ConverterContext context)
string - the string to be converted.context - the converter context.protected abstract java.time.format.DateTimeFormatter getFullDateTimeFormatter()
protected abstract java.time.format.DateTimeFormatter getLongDateTimeFormatter()
protected abstract java.time.format.DateTimeFormatter getMediumDateTimeFormatter()
protected abstract java.time.format.DateTimeFormatter getShortDateTimeFormatter()
public java.time.format.DateTimeFormatter getDefaultDateTimeFormatter()
public void setDefaultDateTimeFormatter(java.time.format.DateTimeFormatter defaultFormat)
defaultFormat - the default DateTimeFormatter