private List<Row> extractRows(Report report, ResultSet rs) throws SQLException
    {
        ResultSetMetaData metaData = rs.getMetaData();
        int numColumns = metaData.getColumnCount();

        List<Row> rows = new ArrayList<Row>();
        while (rs.next())
        {
            Object obj[] = new Object[numColumns];
            for (int i = 1; i <= numColumns; i++)
            {
                com.hashedin.dashboard.report.Column reportColumn = report.getColumn(i);

                int type = metaData.getColumnType(i);
                String reportType = reportColumn.getType();
                if ("timeofday".equalsIgnoreCase(reportType) && (type == java.sql.Types.VARCHAR))
                {
                    String timeOfDayStr = rs.getString(i);
                    int[] timeOfDay = asTimeOfDay(timeOfDayStr);
                    obj[i - 1] = timeOfDay;
                } else if ("timeofday".equalsIgnoreCase(reportType) && (type == java.sql.Types.INTEGER))
                {
                    int seconds = rs.getInt(i);
                    int[] timeOfDay = asTimeOfDay(seconds);
                    obj[i - 1] = timeOfDay;
                } else if (type == java.sql.Types.INTEGER)
                {
                    obj[i - 1] = new Integer(rs.getInt(i));
                } else
                {
                    obj[i - 1] = rs.getString(i);
                }
            }
            rows.add(new Row(obj));
        }
        return rows;
    }