Examples of loadAll()


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

    BookMarkReference bookmarkRef3 = new BookMarkReference(DynamicDAO.save(bookmark3).getId());

    Collection<IBookMark> filledBookmarks = DynamicDAO.loadAll(IBookMark.class);
    assertEquals(3, filledBookmarks.size());

    filledBookmarks = markDAO.loadAll();
    assertEquals(3, filledBookmarks.size());

    for (IBookMark mark : filledBookmarks) {
      if (bookmarkRef1.resolve().equals(mark))
        assertEquals(bookmark1.getName(), mark.getName());
View Full Code Here

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

    DynamicDAO.save(root1);
    root1 = null;
    System.gc();

    IBookMarkDAO markDAO = DynamicDAO.getDAO(IBookMarkDAO.class);
    Collection<IBookMark> marks = markDAO.loadAll();
    assertEquals(1, marks.size());
    assertEquals(folderName, marks.iterator().next().getParent().getName());
    marks = null;
    System.gc();
View Full Code Here

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

    assertEquals(1, marks.size());
    assertEquals(folderName, marks.iterator().next().getParent().getName());
    marks = null;
    System.gc();

    marks = markDAO.loadAll();
    assertEquals(1, marks.size());
  }

  /**
   * @throws Exception
View Full Code Here

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

        INews news = (INews) object;
        FeedLinkReference feedRef = news.getFeedReference();

        IBookMark bookmark = feedToBookMarkCache.get(feedRef);
        if (bookmark == null) {
          Collection<IBookMark> bookmarks = bookmarkDao.loadAll(feedRef);
          if (bookmarks.isEmpty())
            continue;

          bookmark = bookmarks.iterator().next();
          feedToBookMarkCache.put(feedRef, bookmark);
View Full Code Here

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

   *
   * @return Returns a Set of all Links that are added as Bookmarks.
   */
  public static Set<String> getFeedLinks() {
    IBookMarkDAO bookMarkDAO = Owl.getPersistenceService().getDAOService().getBookMarkDAO();
    Collection<IBookMark> bookMarks = bookMarkDAO.loadAll();
    Set<String> links = new HashSet<String>(bookMarks.size());

    for (IBookMark bookmark : bookMarks) {
      links.add(bookmark.getFeedLinkReference().getLinkAsText());
    }
View Full Code Here

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

   * @return Returns the first <code>IBookMark</code> that references the given
   * Feed or <code>null</code> if none.
   */
  public static IBookMark getBookMark(FeedLinkReference feedRef) {
    IBookMarkDAO bookMarkDAO = Owl.getPersistenceService().getDAOService().getBookMarkDAO();
    Collection<IBookMark> bookMarks = bookMarkDAO.loadAll();
    for (IBookMark bookMark : bookMarks) {
      if (bookMark.getFeedLinkReference().equals(feedRef))
        return bookMark;
    }

View Full Code Here

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

   * @return Returns the first <code>IBookMark</code> that references the given
   * Feed or <code>null</code> if none.
   */
  public static IBookMark getBookMark(String feedRef) {
    IBookMarkDAO bookMarkDAO = Owl.getPersistenceService().getDAOService().getBookMarkDAO();
    Collection<IBookMark> bookMarks = bookMarkDAO.loadAll();
    for (IBookMark bookMark : bookMarks) {
      if (bookMark.getFeedLinkReference().getLinkAsText().equals(feedRef))
        return bookMark;
    }

View Full Code Here

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

  public void testLoadAllBookMarks() throws Exception {
    IFeed feed = fFactory.createFeed(null, new URI("http://www.myfeed.com"));
    DynamicDAO.save(feed);

    IBookMarkDAO markDAO = DynamicDAO.getDAO(IBookMarkDAO.class);
    Collection<IBookMark> emptyBookmarks = markDAO.loadAll();
    assertEquals(0, emptyBookmarks.size());

    IFolder root1 = fFactory.createFolder(null, null, "Root 1");
    root1 = DynamicDAO.save(root1);
View Full Code Here

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

    BookMarkReference bookmarkRef3 = new BookMarkReference(DynamicDAO.save(bookmark3).getId());

    Collection<IBookMark> filledBookmarks = DynamicDAO.loadAll(IBookMark.class);
    assertEquals(3, filledBookmarks.size());

    filledBookmarks = markDAO.loadAll();
    assertEquals(3, filledBookmarks.size());

    for (IBookMark mark : filledBookmarks) {
      if (bookmarkRef1.resolve().equals(mark))
        assertEquals(bookmark1.getName(), mark.getName());
View Full Code Here

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

    DynamicDAO.save(root1);
    root1 = null;
    System.gc();

    IBookMarkDAO markDAO = DynamicDAO.getDAO(IBookMarkDAO.class);
    Collection<IBookMark> marks = markDAO.loadAll();
    assertEquals(1, marks.size());
    assertEquals(folderName, marks.iterator().next().getParent().getName());
    marks = null;
    System.gc();
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.