Class DateTimeDatatype
java.lang.Object
io.jmix.core.metamodel.datatype.impl.DateTimeDatatype
- All Implemented Interfaces:
Datatype<Date>
,ParameterizedDatatype
,TimeZoneAwareDatatype
public class DateTimeDatatype
extends Object
implements Datatype<Date>, ParameterizedDatatype, TimeZoneAwareDatatype
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionConverts value to String.Converts value to String taking into account local formats.Converts value to String taking into account local formats and timezone.Parses value from StringParses value from String taking into account local formatsvoid
setFormatStringsRegistry
(FormatStringsRegistry formatStringsRegistry) toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.jmix.core.metamodel.datatype.Datatype
getId, getJavaClass
-
Field Details
-
formatStringsRegistry
-
-
Constructor Details
-
DateTimeDatatype
public DateTimeDatatype()
-
-
Method Details
-
setFormatStringsRegistry
-
format
Description copied from interface:Datatype
Converts value to String. Returns an empty string for null value. -
format
Description copied from interface:Datatype
Converts value to String taking into account local formats. Returns an empty string for null value. -
format
Description copied from interface:TimeZoneAwareDatatype
Converts value to String taking into account local formats and timezone. Returns an empty string for null value.- Specified by:
format
in interfaceTimeZoneAwareDatatype
-
parse
Description copied from interface:Datatype
Parses value from String- Specified by:
parse
in interfaceDatatype<Date>
- Throws:
ParseException
-
parse
Description copied from interface:Datatype
Parses value from String taking into account local formats- Specified by:
parse
in interfaceDatatype<Date>
- Throws:
ParseException
-
parse
@Nullable public Date parse(@Nullable String value, Locale locale, @Nullable TimeZone timeZone) throws ParseException - Throws:
ParseException
-
getParameters
- Specified by:
getParameters
in interfaceParameterizedDatatype
-
toString
-