tri.close();
    public void addCollection(Collection c) throws SQLException,            AuthorizeException    {        // Check authorisation        AuthorizeManager.authorizeAction(ourContext, this, Constants.ADD);        log.info(LogManager.getHeader(ourContext, "add_collection",                "community_id=" + getID() + ",collection_id=" + c.getID()));        // Find out if mapping exists        TableRowIterator tri = DatabaseManager.query(ourContext,                "community2collection",                "SELECT * FROM community2collection WHERE community_id="                        + getID() + " AND collection_id=" + c.getID());        if (!tri.hasNext())        {            // No existing mapping, so add one            TableRow mappingRow = DatabaseManager.create(ourContext,                    "community2collection");            mappingRow.setColumn("community_id", getID());            mappingRow.setColumn("collection_id", c.getID());            DatabaseManager.update(ourContext, mappingRow);        }    }