Class ScalarTypeArrayList

    • Method Detail

      • bind

        public void bind​(DataBind bind,
                         List value)
                  throws SQLException
        Description copied from interface: ScalarType
        Convert (if necessary) and bind the value to the preparedStatement.

        value may need to be converted from the logical bean property type to the JDBC type.

        Specified by:
        bind in interface ScalarType<List>
        Throws:
        SQLException
      • parse

        public List 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().

        Specified by:
        parse in interface ScalarType<List>
        Specified by:
        parse in interface StringParser
      • read

        public T read​(DataReader reader)
               throws SQLException
        Description copied from interface: ScalarType
        Read the value from the resultSet and convert if necessary to the logical bean property value.
        Throws:
        SQLException
      • isMutable

        public boolean isMutable()
        Consider as a mutable type. Use the isDirty() method to check for dirty state.
        Specified by:
        isMutable in interface ScalarType<T>
        Overrides:
        isMutable in class ScalarTypeBase<T>
      • isDirty

        public boolean isDirty​(Object value)
        Return true if the value should be considered dirty (and included in an update).
        Specified by:
        isDirty in interface ScalarType<T>
        Overrides:
        isDirty in class ScalarTypeBase<T>
      • toJdbcType

        public Object toJdbcType​(Object value)
        Description copied from interface: ScalarType
        Convert the value as necessary to the JDBC type.

        Note that this should also match the type as per the getJdbcType() method.

        This is typically used when the matching type is used in a where clause and we use this to ensure it is an appropriate jdbc type.

        Specified by:
        toJdbcType in interface ScalarType<T>
      • toBeanType

        public T toBeanType​(Object value)
        Description copied from interface: ScalarType
        Convert the value as necessary to the logical Bean type.

        The type as per the bean property.

        This is used to automatically convert id values (typically from a string to a int, long or UUID).

        Specified by:
        toBeanType in interface ScalarType<T>
      • 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).

        Specified by:
        isDateTimeCapable in interface ScalarType<T>
      • convertFromMillis

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

        For non dateTime types this will throw an exception.

        Specified by:
        convertFromMillis in interface ScalarType<T>