Subject Re: Data Conversion
Author Roman Rokytskyy
John,

> Was the discussion about converting data in setXXX (and getXXX)
> functions resolved? The reason for asking is that i'm switching a
> bigger project over to jaybird and need to convert all my setString
> (x) to setInt(Integer.parseInt(x)), etc (i'm using strings as they
> are parameters to a servlet). I don't mind going through and adding
> the necessary conversion functions, but i'm trying to avoid
> creating my own branch of the code. I realise there is the
> setObject function, but i expect that this will be slower than
> explicit conversions.

What discussion you are referring to? With current implementation you
can use setString(...) method and fields will try to parse your
string and convert it into integer/long/float/double/BigDecimal
depending on the underlying data type. At least they are supposed to
do this. There is a compatibility matrix in JDBC specification and I
think we implemented it fully for getXXX and setXXX methods.

If you pass String to a setObject(...) method, call will be
redirected to setString(...) method.

Does this answers your question?

Best regards,
Roman Rokytskyy