if (Jdbc3Utils.supportsJava14JdbcTypes()) { if (typeCode == Jdbc3Utils.determineBooleanTypeCode()) { statement.setBoolean(sqlIndex, ((Boolean)value).booleanValue()); return; } } switch (typeCode) { case Types.BIT : statement.setBoolean(sqlIndex, ((Boolean)value).booleanValue()); break; case Types.BIGINT : statement.setLong(sqlIndex, ((Long)convert(value, Long.class)).longValue()); break; case Types.DECIMAL : case Types.NUMERIC : statement.setBigDecimal(sqlIndex, (BigDecimal)convert(value, BigDecimal.class)); break; case Types.DOUBLE : case Types.FLOAT : statement.setDouble(sqlIndex, ((Double)convert(value, Double.class)).doubleValue()); break; case Types.INTEGER : statement.setInt(sqlIndex, ((Integer)convert(value, Integer.class)).intValue()); break; case Types.REAL : statement.setFloat(sqlIndex, ((Float)convert(value, Float.class)).floatValue()); break; case Types.SMALLINT : case Types.TINYINT : statement.setShort(sqlIndex, ((Short)convert(value, Short.class)).shortValue()); break; case Types.CHAR : case Types.VARCHAR : case Types.LONGVARCHAR : statement.setString(sqlIndex, value.toString()); break; case Types.DATE : statement.setDate(sqlIndex, (Date)value); break; case Types.TIME : statement.setTime(sqlIndex, (Time)value); break; case Types.TIMESTAMP : statement.setTimestamp(sqlIndex, (Timestamp)value); break; case Types.BLOB : statement.setBlob(sqlIndex, (Blob)value); break; case Types.CLOB : statement.setClob(sqlIndex, (Clob)value); break; case Types.NULL : statement.setNull(sqlIndex, typeCode); break; default: statement.setObject(sqlIndex, value); break; }
statement.setObject(sqlIndex, value, typeCode);
    protected void setObject(PreparedStatement statement, int sqlIndex, DynaBean dynaBean, SqlDynaProperty property) throws SQLException    {        int    typeCode = property.getColumn().getTypeCode();        Object value    = dynaBean.get(property.getName());        if (value == null)        {            statement.setNull(sqlIndex, typeCode);        }        else if (value instanceof String)        {            statement.setString(sqlIndex, (String)value);        }        else        {            if (Jdbc3Utils.supportsJava14JdbcTypes())            {                if (typeCode == Jdbc3Utils.determineBooleanTypeCode())                {                    statement.setBoolean(sqlIndex, ((Boolean)value).booleanValue());                    return;                }            }            switch (typeCode)            {                case Types.BIT :                    statement.setBoolean(sqlIndex, ((Boolean)value).booleanValue());                    break;                case Types.BIGINT :                    statement.setLong(sqlIndex, ((Long)convert(value, Long.class)).longValue());                    break;                case Types.DECIMAL :                case Types.NUMERIC :                    statement.setBigDecimal(sqlIndex, (BigDecimal)convert(value, BigDecimal.class));                    break;                case Types.DOUBLE :                case Types.FLOAT :                    statement.setDouble(sqlIndex, ((Double)convert(value, Double.class)).doubleValue());                    break;                case Types.INTEGER :                    statement.setInt(sqlIndex, ((Integer)convert(value, Integer.class)).intValue());                    break;                case Types.REAL :                    statement.setFloat(sqlIndex, ((Float)convert(value, Float.class)).floatValue());                    break;                case Types.SMALLINT :                case Types.TINYINT :                    statement.setShort(sqlIndex, ((Short)convert(value, Short.class)).shortValue());                    break;                case Types.CHAR :                case Types.VARCHAR :                case Types.LONGVARCHAR :                    statement.setString(sqlIndex, value.toString());                    break;                case Types.DATE :                    statement.setDate(sqlIndex, (Date)value);                    break;                case Types.TIME :                    statement.setTime(sqlIndex, (Time)value);                    break;                case Types.TIMESTAMP :                    statement.setTimestamp(sqlIndex, (Timestamp)value);                    break;                case Types.BLOB :                    statement.setBlob(sqlIndex, (Blob)value);                    break;                case Types.CLOB :                    statement.setClob(sqlIndex, (Clob)value);                    break;                case Types.NULL :                    statement.setNull(sqlIndex, typeCode);                    break;                default:                    statement.setObject(sqlIndex, value);                    break;            }        }    }