public List getTables() throws SQLException
private List getTables() throws SQLException
    public List getTables() throws SQLException    {        ResultSet tableData = null;        try        {            tableData = connection.getMetaData().getTables(catalog, schema, "%", tableTypes);                        Set  availableColumns = determineAvailableColumns(tableData);            List tables           = new ArrayList();            while (tableData.next())            {                String tableName = getValueAsString(tableData, "TABLE_NAME", availableColumns, null);                                if ((tableName != null) && (tableName.length() > 0))                {                    Table table = new Table();                        table.setName(tableName);                    table.setType(getValueAsString(tableData, "TABLE_TYPE", availableColumns, "UNKNOWN"));                    table.setCatalog(getValueAsString(tableData, "TABLE_CAT", availableColumns, null));                    table.setSchema(getValueAsString(tableData, "TABLE_SCHEM", availableColumns, null));                    table.setDescription(getValueAsString(tableData, "REMARKS", availableColumns, ""));                    tables.add(table);                }            }            for (Iterator it = tables.iterator(); it.hasNext();)            {                Table table = (Table)it.next();                for (Iterator columnIt = getColumnsForTable(table.getName()).iterator(); columnIt.hasNext();)                {                    table.addColumn((Column)columnIt.next());                }                for (Iterator fkIt = getForeignKeysForTable(table.getName()).iterator(); fkIt.hasNext();)                {                    table.addForeignKey((ForeignKey)fkIt.next());                }                for (Iterator idxIt = getIndicesForTable(table.getName()).iterator(); idxIt.hasNext();)                {                    table.addIndex((Index)idxIt.next());                }            }            return tables;        }        finally        {            if (tableData != null)            {                tableData.close();            }        }    }