Interface Datatype<T>

All Known Subinterfaces:
Enumeration<T>
All Known Implementing Classes:
AbstractTemporalDatatype, AdaptiveNumberDatatype, BigDecimalDatatype, BooleanDatatype, ByteArrayDatatype, CharacterDatatype, DateDatatype, DateTimeDatatype, DoubleDatatype, EnumerationImpl, FileRefDatatype, IntegerDatatype, LineStringDatatype, LocalDateDatatype, LocalDateTimeDatatype, LocalTimeDatatype, LongDatatype, OffsetDateTimeDatatype, OffsetTimeDatatype, PointDatatype, PolygonDatatype, StringDatatype, TimeDatatype, UriDatatype, UuidDatatype

public interface Datatype<T>
Represents a data type of an entity property.
  • Method Summary

    Modifier and Type
    Method
    Description
    format(Object value)
    Converts value to String.
    format(Object value, Locale locale)
    Converts value to String taking into account local formats.
    default String
    Unique ID of the Datatype used for registration
    default Class
    Java class representing this Datatype
    parse(String value)
    Parses value from String
    parse(String value, Locale locale)
    Parses value from String taking into account local formats
  • Method Details

    • format

      String format(@Nullable Object value)
      Converts value to String. Returns an empty string for null value.
    • format

      String format(@Nullable Object value, Locale locale)
      Converts value to String taking into account local formats. Returns an empty string for null value.
    • parse

      @Nullable T parse(@Nullable String value) throws ParseException
      Parses value from String
      Throws:
      ParseException
    • parse

      @Nullable T parse(@Nullable String value, Locale locale) throws ParseException
      Parses value from String taking into account local formats
      Throws:
      ParseException
    • getId

      default String getId()
      Unique ID of the Datatype used for registration
    • getJavaClass

      default Class getJavaClass()
      Java class representing this Datatype