Package org.rssowl.core.persist

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


    while (UndoStack.getInstance().isUndoSupported()) {
      UndoStack.getInstance().undo();
      undos++;
    }

    assertEquals(true, news.toReference().resolve().isFlagged());
    assertEquals(20, undos);

    assertEquals(true, UndoStack.getInstance().isRedoSupported());

    int redos = 0;
View Full Code Here


      undos++;
    }

    assertEquals(1, undos);
    assertEquals(true, UndoStack.getInstance().isRedoSupported());
    assertEquals(true, news.toReference().resolve().isFlagged());
  }
}
View Full Code Here

        List<StatesUpdateInfo> list = statesUpdateInfos.get(news.getParentId());
        if (list == null) {
          list = new ArrayList<StatesUpdateInfo>();
          statesUpdateInfos.put(news.getParentId(), list);
        }
        list.add(new StatesUpdateInfo(newsEvent.getOldNews().getState(), news.getState(), news.toReference()));
      }
    }
    for (NewsEvent newsEvent : newsEventRunnable.getPersistEvents()) {
      INews news = newsEvent.getEntity();
      if (news.getParentId() != 0) {
View Full Code Here

        List<StatesUpdateInfo> list = statesUpdateInfos.get(news.getParentId());
        if (list == null) {
          list = new ArrayList<StatesUpdateInfo>();
          statesUpdateInfos.put(news.getParentId(), list);
        }
        list.add(new StatesUpdateInfo(null, news.getState(), news.toReference()));
      }
    }
    if (!statesUpdateInfos.isEmpty()) {
      Set<FeedLinkReference> removedFeedRefs = new HashSet<FeedLinkReference>();
      INewsBinDAO newsBinDAO = DynamicDAO.getDAO(INewsBinDAO.class);
View Full Code Here

    while (UndoStack.getInstance().isUndoSupported()) {
      UndoStack.getInstance().undo();
      undos++;
    }

    assertEquals(true, news.toReference().resolve().isFlagged());
    assertEquals(20, undos);

    assertEquals(true, UndoStack.getInstance().isRedoSupported());

    int redos = 0;
View Full Code Here

      undos++;
    }

    assertEquals(1, undos);
    assertEquals(true, UndoStack.getInstance().isRedoSupported());
    assertEquals(true, news.toReference().resolve().isFlagged());
  }
}
View Full Code Here

        List<StatesUpdateInfo> list = statesUpdateInfos.get(news.getParentId());
        if (list == null) {
          list = new ArrayList<StatesUpdateInfo>();
          statesUpdateInfos.put(news.getParentId(), list);
        }
        list.add(new StatesUpdateInfo(newsEvent.getOldNews().getState(), news.getState(), news.toReference()));
      }
    }

    for (NewsEvent newsEvent : newsEventRunnable.getPersistEvents()) {
      INews news = newsEvent.getEntity();
View Full Code Here

        List<StatesUpdateInfo> list = statesUpdateInfos.get(news.getParentId());
        if (list == null) {
          list = new ArrayList<StatesUpdateInfo>();
          statesUpdateInfos.put(news.getParentId(), list);
        }
        list.add(new StatesUpdateInfo(null, news.getState(), news.toReference()));
      }
    }

    if (!statesUpdateInfos.isEmpty()) {
      Set<FeedLinkReference> removedFeedRefs = new HashSet<FeedLinkReference>();
View Full Code Here

    IBookMark bookmark = Owl.getModelFactory().createBookMark(null, folder, new FeedLinkReference(feed.getLink()), "Bookmark");

    DynamicDAO.save(bookmark);

    assertNotNull(feed.toReference().resolve());
    assertNotNull(news.toReference().resolve());
    assertNotNull(folder.toReference().resolve());
    assertNotNull(bookmark.toReference().resolve());

    InternalOwl.getDefault().recreateProfile(false); //Creates a new, empty rssowl.db.restore
    assertTrue(new File(DBManager.getDBRestoreFilePath()).exists());
View Full Code Here

    assertTrue(new File(DBManager.getDBRestoreFilePath()).exists());
    InternalOwl.getDefault().startup(new LongOperationMonitor(new NullProgressMonitor()) {}, false, false); //Normal startup will pickup rssowl.db.restore
    assertFalse(new File(DBManager.getDBRestoreFilePath()).exists());

    assertNull(feed.toReference().resolve());
    assertNull(news.toReference().resolve());
    assertNull(folder.toReference().resolve());
    assertNull(bookmark.toReference().resolve());

    feed = DynamicDAO.save(createFeed());
    news = createNews(feed);
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.