tri.close();
    public static Community[] findAll(Context context) throws SQLException    {        TableRowIterator tri = DatabaseManager.query(context, "community",                "SELECT * FROM community ORDER BY name");        List communities = new ArrayList();        while (tri.hasNext())        {            TableRow row = tri.next();            // First check the cache            Community fromCache = (Community) context.fromCache(                    Community.class, row.getIntColumn("community_id"));            if (fromCache != null)            {                communities.add(fromCache);            }            else            {                communities.add(new Community(context, row));            }        }        Community[] communityArray = new Community[communities.size()];        communityArray = (Community[]) communities.toArray(communityArray);        return communityArray;    }