public void setObject(int parameterIndex, Object x) throws SQLException {
   if (x instanceof SQLXML) {
     setSQLXML(parameterIndex, (SQLXML) x);
   } else {
     super.setObject(parameterIndex, x);
   }
 }
  public void setObject(int parameterIndex, Object x, int targetSqlType, int scale)
      throws SQLException {
    checkClosed();

    if (x == null) {
      setNull(parameterIndex, targetSqlType);
      return;
    }

    switch (targetSqlType) {
      case Types.SQLXML:
        if (x instanceof SQLXML) {
          setSQLXML(parameterIndex, (SQLXML) x);
        } else {
          setSQLXML(parameterIndex, new Jdbc4SQLXML(connection, x.toString()));
        }
        break;
      default:
        super.setObject(parameterIndex, x, targetSqlType, scale);
    }
  }