
Deleting Activities associated to a particular Category
Hi,
I am trying to delete all the activities of a particular category. Following is whatI tried:
Code:
CategoryDepository.removeBrokedCategory(CategoryDepository.getCategory(oSelectedCatNodeID),
AllUser.class,
CategoryStructureEvent.REMOVED_DELETED);
While the category gets removed or 'unregistered', the activities associated with the category remain and are visible in the dateArea.
I would like to know
[1] How do I delete the activities of a Category? I tried something in the lines of
Code:
Activity actCurrent = (Activity)ActivityDepository.getInstance().getActivities();
Object[] oAllCatIDs = actCurrent.getCategoryIDs();
With the idea of trying to retreive the Category ID of each activity to delete it, but was not able to proceed further.
[2] If an activity is linked to more than one Category, how can one remove a specific activity from a specific Category without disturbing the remaining structure of the ActivityDepository?
[3] Performance Question: If activities/ Category's are only 'delinked' or 'unregistered', (in essence they still remain in memory), when and how can we clean up all dormant activities/ categories?
Else won't it hog the memory over time?
Thanks in advance.