Package org.rssowl.core.persist.dao

Examples of org.rssowl.core.persist.dao.IFolderDAO


  @Override
  protected void onDatabaseOpened(DatabaseEvent event) {
    if (USE_LEGACY_CACHE_ACTIVATION)
      super.onDatabaseOpened(event);
    else {
      IFolderDAO folderDAO = InternalOwl.getDefault().getPersistenceService().getDAOService().getFolderDAO();
      Collection<IFolder> roots = folderDAO.loadRoots();
      Set<IBookMark> bookmarks = new HashSet<IBookMark>();
      CoreUtils.fillBookMarks(bookmarks, roots);
      for (IBookMark bookmark : bookmarks) {
        getCache().put(bookmark.getId(), bookmark);
      }
View Full Code Here


  @Override
  protected void onDatabaseOpened(DatabaseEvent event) {
    if (USE_LEGACY_CACHE_ACTIVATION)
      super.onDatabaseOpened(event);
    else {
      IFolderDAO folderDAO = InternalOwl.getDefault().getPersistenceService().getDAOService().getFolderDAO();
      Collection<IFolder> roots = folderDAO.loadRoots();
      Set<ISearchMark> searchmarks = new HashSet<ISearchMark>();
      CoreUtils.fillSearchMarks(searchmarks, roots);
      for (ISearchMark searchmark : searchmarks) {
        getCache().put(searchmark.getId(), searchmark);
      }
View Full Code Here

    }
  }

  private static void doDirectImport(List<IFolderChild> elements, Map<Long, IFolderChild> mapOldIdToFolderChild) {
    IPreferenceDAO prefsDAO = Owl.getPersistenceService().getDAOService().getPreferencesDAO();
    IFolderDAO folderDAO = DynamicDAO.getDAO(IFolderDAO.class);
    List<IFolder> foldersToSave = new ArrayList<IFolder>();
    Set<IFolder> rootFolders = CoreUtils.loadRootFolders();

    /* Load the current selected Set as Location if necessary */
    IFolder selectedSet = null;
    if (!rootFolders.isEmpty()) {
      if (!InternalOwl.TESTING && PlatformUI.isWorkbenchRunning() && Controller.getDefault().isStarted()) {
        String selectedBookMarkSetPref = BookMarkExplorer.getSelectedBookMarkSetPref(OwlUI.getWindow());
        Long selectedFolderID = prefsDAO.load(selectedBookMarkSetPref).getLong();
        selectedSet = folderDAO.load(selectedFolderID);
      } else
        selectedSet = rootFolders.iterator().next();
    }

    /* Import Elements */
 
View Full Code Here

   * feeds view or the first root folder otherwise. Falls back to
   * <code>null</code> if neither can be resolved.
   */
  public static IFolder getSelectedBookMarkSet() {
    IPreferenceScope preferences = Owl.getPreferenceService().getGlobalScope();
    IFolderDAO folderDAO = DynamicDAO.getDAO(IFolderDAO.class);

    String selectedBookMarkSetPref = BookMarkExplorer.getSelectedBookMarkSetPref(getWindow());
    long selectedFolderID = preferences.getLong(selectedBookMarkSetPref);
    IFolder selectedSet = folderDAO.load(selectedFolderID);
    if (selectedSet != null)
      return selectedSet;

    Set<IFolder> rootFolders = CoreUtils.loadRootFolders();
    if (!rootFolders.isEmpty())
View Full Code Here

  @Override
  protected void onDatabaseOpened(DatabaseEvent event) {
    if (USE_LEGACY_CACHE_ACTIVATION)
      super.onDatabaseOpened(event);
    else {
      IFolderDAO folderDAO = InternalOwl.getDefault().getPersistenceService().getDAOService().getFolderDAO();
      Collection<IFolder> roots = folderDAO.loadRoots();
      Set<INewsBin> newsbins = new HashSet<INewsBin>();
      CoreUtils.fillNewsBins(newsbins, roots);
      for (INewsBin newsbin : newsbins) {
        getCache().put(newsbin.getId(), newsbin);
      }
View Full Code Here

  @Override
  protected void onDatabaseOpened(DatabaseEvent event) {
    if (USE_LEGACY_CACHE_ACTIVATION)
      super.onDatabaseOpened(event);
    else {
      IFolderDAO folderDAO = InternalOwl.getDefault().getPersistenceService().getDAOService().getFolderDAO();
      Collection<IFolder> roots = folderDAO.loadRoots();
      Set<IBookMark> bookmarks = new HashSet<IBookMark>();
      CoreUtils.fillBookMarks(bookmarks, roots);
      for (IBookMark bookmark : bookmarks) {
        getCache().put(bookmark.getId(), bookmark);
      }
View Full Code Here

  @Override
  protected void onDatabaseOpened(DatabaseEvent event) {
    if (USE_LEGACY_CACHE_ACTIVATION)
      super.onDatabaseOpened(event);
    else {
      IFolderDAO folderDAO = InternalOwl.getDefault().getPersistenceService().getDAOService().getFolderDAO();
      Collection<IFolder> roots = folderDAO.loadRoots();
      Set<ISearchMark> searchmarks = new HashSet<ISearchMark>();
      CoreUtils.fillSearchMarks(searchmarks, roots);
      for (ISearchMark searchmark : searchmarks) {
        getCache().put(searchmark.getId(), searchmark);
      }
View Full Code Here

TOP

Related Classes of org.rssowl.core.persist.dao.IFolderDAO

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.