int id = System.identityHashCode(modelEvent.getEntity());
EventsMap.getInstance().putEventTemplate(id, modelEvent);
}
static final void saveFeed(ObjectContainer db, IFeed feed) {
ModelEvent feedEventTemplate = new FeedEvent(feed, true);
DBHelper.putEventTemplate(feedEventTemplate);
List<INews> changedNews = new ArrayList<INews>(feed.getNews().size());
for (INews news : feed.getNews()) {
INews oldNews = db.ext().peekPersisted(news, 2, true);
if (oldNews == null) {
changedNews.add(news);
}
else if (!news.isIdentical(oldNews)) {
ModelEvent newsEventTemplate = new NewsEvent(oldNews, news, false);
DBHelper.putEventTemplate(newsEventTemplate);
changedNews.add(news);
}
}
for (INews news : changedNews) {