void outputResult(ResultSetReference ref) throws SQLException {
        // NOTICE: This method will be called by non AWT thread.
        // To access GUI, use "Later".
        final OutputProcessor opref = env.getOutputProcessor();
        invoker.doLater("clearResultSetTable");
        ResultSet rs = ref.getResultSet();
        ColumnOrder order = ref.getOrder();
        final boolean needsOrderChange = order.size() > 0;
        ResultSetMetaData meta = rs.getMetaData();
        final int columnCount = (needsOrderChange) ? order.size() : meta.getColumnCount();
        final ResultSetTableModel m = new ResultSetTableModel(ref);
        Vector<Object> v = new Vector<Object>(columnCount);
        ValueTransporter transfer = ValueTransporter.getInstance("");
        final int limit = Bootstrap.getPropertyAsInt("net.argius.stew.rowcount.limit",
                                                     Integer.MAX_VALUE);
        int rowCount = 0;
        while (rs.next()) {
            if (rowCount >= limit) {
                invoker.doLater("notifyOverLimit", limit);
                break;
            }
            ++rowCount;
            v.clear();
            for (int i = 0; i < columnCount; i++) {
                final int index = needsOrderChange ? order.getOrder(i) : i + 1;
                v.add(transfer.getObject(rs, index));
            }
            m.addRow((Vector<?>)v.clone());
            if (env.getOutputProcessor() != opref) {
                throw new SQLException("interrupted");
            }
        }
        invoker.doLater("showResult", m);
        ref.setRecordCount(m.getRowCount());
    }