Package org.rssowl.core.model.events

Examples of org.rssowl.core.model.events.NewsEvent


    return modelEvent;
  }

  private ModelEvent createNewsEvent(INews news, ModelEvent template, boolean root) {
    ModelEvent modelEvent;
    NewsEvent newsTemplate = (NewsEvent) template;
    INews oldNews = newsTemplate == null ? null : newsTemplate.getOldNews();
   
    modelEvent = new NewsEvent(oldNews, news, root);
    return modelEvent;
  }
View Full Code Here


  /*
   * @see org.rssowl.core.model.dao.IModelDAO#deleteNews(org.rssowl.core.model.reference.NewsReference)
   */
  public final void deleteNews(NewsReference reference) throws PersistenceException {
    INews news = loadNews(reference.getId());
    NewsEvent event = new NewsEvent(null, news, true);
    deleteEntityAndFireEvents(event);
  }
View Full Code Here

    //TODO Not sure about this, but let's do it for now to help us track a bug
    //in NewsService where never having a newsUpdated with a null oldNews is
    //helpful
    INews news = attachment.getNews();
    INews oldNews = fDb.ext().peekPersisted(news, 2, true);
    NewsEvent newsEvent = new NewsEvent(oldNews, news, false);
    DBHelper.putEventTemplate(newsEvent);
    deleteEntityAndFireEvents(event);
  }
View Full Code Here

  public INews saveNews(INews news) throws PersistenceException {
    INews oldNews = fDb.ext().peekPersisted(news, Integer.MAX_VALUE, true);
    if (news.isIdentical(oldNews))
      return news;
   
    ModelEvent event = new NewsEvent(oldNews, news, true);
    saveCommitAndFireEvents(event, false);
    return news;
  }
View Full Code Here

TOP

Related Classes of org.rssowl.core.model.events.NewsEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.