Examples of IPreference


Examples of org.rssowl.core.persist.IPreference

    super.doSave(entity);
  }

  public boolean delete(String key) throws PersistenceException {
    IPreference pref = load(key);
    if (pref == null)
      return false;

    delete(pref);
    return true;
View Full Code Here

Examples of org.rssowl.core.persist.IPreference

    }
    return null;
  }

  public IPreference loadOrCreate(String key) throws PersistenceException {
    IPreference pref = load(key);
    if (pref == null)
      return Owl.getModelFactory().createPreference(key);

    return pref;
  }
View Full Code Here

Examples of org.rssowl.core.persist.IPreference

      delete(key);
      return;
    }

    /* Save to DB */
    IPreference pref = fPreferenceDAO.loadOrCreate(key);
    pref.putStrings(value);
    fPreferenceDAO.save(pref);
  }
View Full Code Here

Examples of org.rssowl.core.persist.IPreference

      delete(key);
      return;
    }

    /* Save to DB */
    IPreference pref = fPreferenceDAO.loadOrCreate(key);
    pref.putStrings(values);
    fPreferenceDAO.save(pref);
  }
View Full Code Here

Examples of org.rssowl.core.persist.IPreference

    super(Preference.class, true);
  }

  @Override
  protected void doSave(IPreference entity) {
    IPreference pref = load(entity.getKey());
    if (pref != null && pref != entity)
      throw new UniqueConstraintException("key", entity);
   
    super.doSave(entity);
  }
View Full Code Here

Examples of org.rssowl.core.persist.IPreference

   
    super.doSave(entity);
  }

  public boolean delete(String key) throws PersistenceException {
    IPreference pref = load(key);
    if (pref == null)
      return false;
   
    delete(pref);
    return true;
View Full Code Here

Examples of org.rssowl.core.persist.IPreference

    }
    return null;
  }

  public IPreference loadOrCreate(String key) throws PersistenceException {
    IPreference pref = load(key);
    if (pref == null)
      return Owl.getModelFactory().createPreference(key);
   
    return pref;
  }
View Full Code Here

Examples of org.rssowl.core.persist.IPreference

    /* Update Set Actions */
    fViewSite.getActionBars().getToolBarManager().find(PREVIOUS_SET_ACTION).update(IAction.ENABLED);
    fViewSite.getActionBars().getToolBarManager().find(NEXT_SET_ACTION).update(IAction.ENABLED);

    /* Save the new selected Set in Preferences */
    IPreference pref = fPrefDAO.loadOrCreate(getSelectedBookMarkSetPref(fViewSite.getWorkbenchWindow()));
    pref.putLongs(fSelectedBookMarkSet.getId());
    fPrefDAO.save(pref);
  }
View Full Code Here

Examples of org.rssowl.core.persist.IPreference

      i++;
    }
    /* Add the ID of the current selected Set to make it Unique */
    String key = PREF_EXPANDED_NODES + fSelectedBookMarkSet;

    IPreference pref = fPrefDAO.loadOrCreate(key);
    pref.putLongs(elements);
    fPrefDAO.save(pref);
  }
View Full Code Here

Examples of org.rssowl.core.persist.IPreference

    fLinkingEnabled = fGlobalPreferences.getBoolean(DefaultPreferences.BE_ENABLE_LINKING);
    fFilterType = BookMarkFilter.Type.values()[fGlobalPreferences.getInteger(DefaultPreferences.BE_FILTER_TYPE)];
    fGroupingType = BookMarkGrouping.Type.values()[fGlobalPreferences.getInteger(DefaultPreferences.BE_GROUP_TYPE)];

    String selectedBookMarkSetPref = getSelectedBookMarkSetPref(fViewSite.getWorkbenchWindow());
    IPreference pref = fPrefDAO.load(selectedBookMarkSetPref);
    Assert.isTrue(fRootFolders.size() > 0, "Could not find any Bookmark Set!"); //$NON-NLS-1$
    if (pref != null)
      fSelectedBookMarkSet = new FolderReference(pref.getLong().longValue()).resolve();
    else {
      fSelectedBookMarkSet = getRootFolderAt(0);

      /* Save this to make sure subsequent calls succeed */
      pref = Owl.getModelFactory().createPreference(selectedBookMarkSetPref);
      pref.putLongs(fSelectedBookMarkSet.getId());
      fPrefDAO.save(pref);
    }

    /* Expanded Elements */
    loadExpandedElements();
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.