Package org.rssowl.core.persist

Examples of org.rssowl.core.persist.INews.merge()


    for (int i = 0, c = fNews.size(); i < c; ++i) {
      INews existingNews = fNews.get(i);
      int existingNewsIndex = findNews(newsListCopy, existingNews);

      if (existingNewsIndex > -1) {
        mergeResult.addAll(existingNews.merge(newsListCopy.get(existingNewsIndex)));
        newsListCopy.remove(existingNewsIndex);
      } else if ((newsToCleanUp != null) && (existingNews.getState() == INews.State.DELETED))
        newsToCleanUp.add(Integer.valueOf(i));

    }
View Full Code Here


    news2.setLink(new URI("http://www.news.com"));
    fFactory.createAttachment(null, news1);
    DynamicDAO.save(feed);
    fFactory.createAttachment(null, news2);

    news2.merge(news1);
  }

  /**
   * @throws Exception
   */
 
View Full Code Here

    for (int i = fNews.size() - 1; i >= 0; --i) {
      INews existingNews = fNews.get(i);
      int existingNewsIndex = findNews(newsListCopy, existingNews);

      if (existingNewsIndex > -1) {
        mergeResult.addAll(existingNews.merge(newsListCopy.get(existingNewsIndex)));
        newsListCopy.remove(existingNewsIndex);
      } else if ((newsToCleanUp != null) && (existingNews.getState() == INews.State.DELETED)) {
        newsToCleanUp = ArrayUtils.ensureCapacity(newsToCleanUp, newsToCleanUpSize + 1);
        newsToCleanUp[newsToCleanUpSize++] = i;
      }
View Full Code Here

        INews existingNews = fNews.get(i);
        int existingNewsIndex = findNews(newsListCopy, existingNews);

        /* News exists in feed: Merge it */
        if (existingNewsIndex > -1) {
          mergeResult.addAll(existingNews.merge(newsListCopy.get(existingNewsIndex)));
          newsListCopy.remove(existingNewsIndex);
        }

        /* News does not exist in feed: Delete it */
        else if ((newsToCleanUp != null) && (existingNews.getState() == INews.State.DELETED)) {
View Full Code Here

    news2.setLink(new URI("http://www.news.com"));
    fFactory.createAttachment(null, news1);
    DynamicDAO.save(feed);
    fFactory.createAttachment(null, news2);

    news2.merge(news1);
  }

  /**
   * @throws Exception
   */
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.