DynamicDAO.removeEntityListener(INews.class, fNewsListener);
}
/* Update Entities that are affected by the given NewsEvents */
private void updateParents(final Set<NewsEvent> events) {
INewsBinDAO newsBinDao = DynamicDAO.getDAO(INewsBinDAO.class);
/* Group by Feed and Bins */
Set<FeedLinkReference> affectedFeeds = new HashSet<FeedLinkReference>();
Set<IFolder> affectedBinFolders = new HashSet<IFolder>();
Set<Long> handledBins = new HashSet<Long>();
for (NewsEvent event : events) {
INews news = event.getEntity();
long parentId = news.getParentId();
if (!fBookmarkGrouping.isActive() && parentId != 0) {
if (!handledBins.contains(parentId)) {
INewsBin bin = newsBinDao.load(parentId);
if (bin != null) //Could have been deleted meanwhile
affectedBinFolders.add(bin.getParent());
handledBins.add(parentId);
}
} else