Change By: Ivan Masár (15/Oct/13 11:28 AM)
Description: Currently, the process for deleting an item is:
        Item item = Item.find(context, itemID);
        Collection[] collections = item.getCollections();
        for (Collection collection : collections)
        {  
            collection.removeItem(item);
        }

It's tiresome and unnecessary. I propose adding a public Item.expunge() method which will do the above in a single call. The old code can still be used where necessary/advantageous.


Please note that the private Item.delete() method doesn't remove the item from collections:
https://github.com/DSpace/DSpace/blob/dspace-3.2/dspace-api/src/main/java/org/dspace/content/Item.java#L1988
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Dspace-devel mailing list
Dspace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to