tri.close();
    public Collection[] getCollections() throws SQLException    {        List collections = new ArrayList();        // Get the table rows        TableRowIterator tri = DatabaseManager                .query(                        ourContext,                        "collection",                        "SELECT collection.* FROM collection, community2collection WHERE "                                + "community2collection.collection_id=collection.collection_id "                                + "AND community2collection.community_id="                                + getID() + " ORDER BY collection.name");        // Make Collection objects        while (tri.hasNext())        {            TableRow row = tri.next();            // First check the cache            Collection fromCache = (Collection) ourContext.fromCache(                    Collection.class, row.getIntColumn("collection_id"));            if (fromCache != null)            {                collections.add(fromCache);            }            else            {                collections.add(new Collection(ourContext, row));            }        }        // Put them in an array        Collection[] collectionArray = new Collection[collections.size()];        collectionArray = (Collection[]) collections.toArray(collectionArray);        return collectionArray;    }