Class ScalarTypeEnumStandard.EnumBase

    • Constructor Detail

      • EnumBase

        public EnumBase​(Class<?> type,
                        boolean jdbcNative,
                        int jdbcType)
    • Method Detail

      • formatValue

        public String formatValue​(Object value)
        Description copied from interface: ScalarType
        Convert the type into a string representation.

        Reciprocal of parse().

      • parse

        public Object parse​(String value)
        Description copied from interface: ScalarType
        Convert the string value to the appropriate java object.

        Mostly used to support CSV, JSON and XML parsing.

        Reciprocal of formatValue().

      • convertFromMillis

        public Object convertFromMillis​(long systemTimeMillis)
        Description copied from interface: ScalarType
        Convert the systemTimeMillis into the appropriate java object.

        For non dateTime types this will throw an exception.

      • isDateTimeCapable

        public boolean isDateTimeCapable()
        Description copied from interface: ScalarType
        Return true if the type can accept long systemTimeMillis input.

        This is used to determine if is is sensible to use the ScalarType.convertFromMillis(long) method.

        This includes the Date, Calendar, sql Date, Time, Timestamp, JODA types as well as Long, BigDecimal and String (although it generally is not expected to parse systemTimeMillis to a String or BigDecimal).