Package org.rssowl.core.persist.dao

Examples of org.rssowl.core.persist.dao.INewsDAO.loadAll()


    newsCollection = newsDao.loadAll(anotherFeedRef, EnumSet.of(INews.State.DELETED));
    assertEquals(1, newsCollection.size());
    assertEquals(anotherFeed.getNews().get(2), newsCollection.iterator().next());

    /* No matching state */
    newsCollection = newsDao.loadAll(feedRef, EnumSet.of(INews.State.DELETED));
    assertEquals(0, newsCollection.size());

    /* One state with two matches and two states with no matches */
    newsCollection = newsDao.loadAll(anotherFeedRef, EnumSet.of(INews.State.NEW, INews.State.HIDDEN, INews.State.UPDATED));
    assertEquals(2, newsCollection.size());
View Full Code Here


    /* No matching state */
    newsCollection = newsDao.loadAll(feedRef, EnumSet.of(INews.State.DELETED));
    assertEquals(0, newsCollection.size());

    /* One state with two matches and two states with no matches */
    newsCollection = newsDao.loadAll(anotherFeedRef, EnumSet.of(INews.State.NEW, INews.State.HIDDEN, INews.State.UPDATED));
    assertEquals(2, newsCollection.size());
    assertEquals(true, newsCollection.contains(anotherFeed.getNews().get(0)));
    assertEquals(true, newsCollection.contains(anotherFeed.getNews().get(1)));

    /* Empty states */
 
View Full Code Here

    assertEquals(2, newsCollection.size());
    assertEquals(true, newsCollection.contains(anotherFeed.getNews().get(0)));
    assertEquals(true, newsCollection.contains(anotherFeed.getNews().get(1)));

    /* Empty states */
    newsCollection = newsDao.loadAll(feedRef, EnumSet.noneOf(INews.State.class));
    assertEquals(0, newsCollection.size());
  }

  /**
   * See bug #558 : Consider not using GUID if isPermaLink is false.
View Full Code Here

        List<INews> news = new ArrayList<INews>();
        for (FeedLinkReference feedRef : feedRefs) {
          if (resolveFeed) {
            news.addAll(feedRef.resolve().getNewsByStates(unreadStates));
          } else {
            news.addAll(newsDAO.loadAll(feedRef, unreadStates));
          }
        }

        newsDAO.setState(news, INews.State.HIDDEN, updateEquivalent, false);
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.