private List getIndicesForTable(String tableName) throws SQLException
private List getIndicesForTable(DatabaseMetaData metaData, String tableName) throws SQLException
    private List getIndicesForTable(String tableName) throws SQLException    {        ResultSet indexData = null;        List      indices   = new ArrayList();        try         {            indexData = connection.getMetaData().getIndexInfo(catalog, schema, tableName, false, false);            Set availableColumns = determineAvailableColumns(indexData);            Map indicesByName    = new LinkedMap();            while (indexData.next())            {                String  indexName = getValueAsString(indexData, "INDEX_NAME", availableColumns, null);                boolean isUnique  = !getValueAsBoolean(indexData, "NON_UNIQUE", availableColumns, true);                Index   index     = (Index)indicesByName.get(indexName);                if ((index == null) && (indexName != null))                {                    if (isUnique)                    {                        index = new UniqueIndex();                    }                    else                    {                        index = new NonUniqueIndex();                    }                    index.setName(indexName);                    indicesByName.put(indexName, index);                }                if (index != null)                {                    IndexColumn ic = new IndexColumn();                    ic.setName(getValueAsString(indexData, "COLUMN_NAME", availableColumns, null));                    index.addColumn(ic);                }            }            indices.addAll(indicesByName.values());        }        catch (SQLException ex)        {            log.trace("Could determine the indices for the table "+tableName, ex);        }        finally        {            if (indexData != null)            {                indexData.close();            }        }        return indices;    }