DatabaseManager.updateQuery(ourContext, "DELETE FROM collection2item WHERE collection_id=" + getID() + ";");   DatabaseManager.updateQuery(ourContext, "DELETE FROM community2collection WHERE collection_id=" + getID() + ";");
delete();
    public void deleteWithContents()        throws SQLException, AuthorizeException, IOException    {        // FIXME: Check auth        // Get items        TableRowIterator items = DatabaseManager.query(ourContext,            "item",            "SELECT item.* FROM item, collection2item WHERE " +                "collection2item.item_id=item.item_id AND " +                "collection2item.collection_id=" + getID() + ";");        // Delete collection-item mappings        DatabaseManager.updateQuery(ourContext,            "DELETE FROM collection2item WHERE collection_id=" + getID() + ";");        // Delete community-collection mappings        DatabaseManager.updateQuery(ourContext,            "DELETE FROM community2collection WHERE collection_id=" + getID() +                ";");        // Delete items if they aren't contained within other collections        while (items.hasNext())        {            Item i = new Item(ourContext, items.next());            Collection[] collections = i.getCollections();            if (collections.length == 0)            {                // Orphaned item; delete                i.deleteWithContents();            }        }        // FIXME: Groups?    }