public abstract class AbstractTemporalDatatype<T extends java.time.temporal.Temporal> extends java.lang.Object implements Datatype<T>, ParameterizedDatatype
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
formatPattern |
Constructor and Description |
---|
AbstractTemporalDatatype(org.dom4j.Element element) |
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.
|
protected abstract java.time.format.DateTimeFormatter |
getDateTimeFormatter() |
protected abstract java.time.format.DateTimeFormatter |
getDateTimeFormatter(FormatStrings formatStrings,
java.util.Locale locale) |
java.util.Map<java.lang.String,java.lang.Object> |
getParameters() |
protected abstract java.time.temporal.TemporalQuery<T> |
newInstance() |
T |
parse(java.lang.String value)
Parses value from String.
|
T |
parse(java.lang.String value,
java.util.Locale locale)
Parses value from String taking into account local formats.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getJavaClass, getName, getSqlType, read, write
public AbstractTemporalDatatype(org.dom4j.Element element)
public java.lang.String format(java.lang.Object value)
Datatype
public java.lang.String format(@Nullable java.lang.Object value, java.util.Locale locale)
Datatype
@Nullable public T parse(@Nullable java.lang.String value) throws java.text.ParseException
Datatype
ValueConversionException
instead of ParseException
.@Nullable public T parse(@Nullable java.lang.String value, java.util.Locale locale) throws java.text.ParseException
Datatype
ValueConversionException
instead of 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
protected abstract java.time.format.DateTimeFormatter getDateTimeFormatter()
protected abstract java.time.format.DateTimeFormatter getDateTimeFormatter(FormatStrings formatStrings, java.util.Locale locale)
protected abstract java.time.temporal.TemporalQuery<T> newInstance()