Package org.rssowl.core.persist

Examples of org.rssowl.core.persist.IEntity


  private IEntity getEntity(EventArgs args) {
    ObjectEventArgs queryArgs = ((ObjectEventArgs) args);
    Object o = queryArgs.object();
    if (o instanceof IEntity) {
      IEntity entity = (IEntity) o;
      return entity;
    }
    return null;
  }
View Full Code Here


    Composite container = new Composite(parent, SWT.NONE);
    container.setLayout(LayoutUtils.createGridLayout(2, 10, 10));

    /* Fields for single Selection */
    if (fEntities.size() == 1) {
      IEntity entity = fEntities.get(0);
      separateFromTop = true;

      /* Link */
      if (entity instanceof IBookMark) {
        Label feedLabel = new Label(container, SWT.None);
View Full Code Here

    }

    /* Now handle single/multi entity Preferences */
    for (IPreferenceScope scope : fEntityPreferences) {
      if (updatePreferences(scope)) {
        IEntity entityToSave = fEntities.get(fEntityPreferences.indexOf(scope));
        entitiesToSave.add(entityToSave);
        fSettingsChanged = true;
      }
    }

View Full Code Here

    return true;
  }

  /* Perform Update on single Entity */
  private boolean internalPerformSingle(Set<IEntity> entitiesToSave) {
    IEntity entity = fEntities.get(0);

    /* Require a Name */
    if (fNameInput.getText().length() == 0) {
      fSite.select(this);
      fNameInput.setFocus();
View Full Code Here

    fSettingsChanged = false;

    /* Update this Entity */
    for (IPreferenceScope scope : fEntityPreferences) {
      if (updatePreferences(scope)) {
        IEntity entityToSave = fEntities.get(fEntityPreferences.indexOf(scope));
        entitiesToSave.add(entityToSave);
        fSettingsChanged = true;
      }
    }

View Full Code Here

    return feeds;
  }

  private void accessAllFields(IPersistable type) {
    if (type instanceof IEntity) {
      IEntity entity = (IEntity) type;
      entity.getId();
      Map<String, ?> properties = entity.getProperties();
      if (properties != null) {
        Set<String> keys = properties.keySet();
        for (String string : keys)
          properties.get(string);
      }
View Full Code Here

      else if (obj instanceof INews || obj instanceof NewsReference)
        news.add(getId(obj));
      else if (obj instanceof EntityGroup) {
        List<EntityGroupItem> items = ((EntityGroup) obj).getItems();
        for (EntityGroupItem item : items) {
          IEntity entity = item.getEntity();
          if (entity instanceof INews)
            news.add(getId(entity));
        }
      }
    }
View Full Code Here

   */
  public Object getParent(Object element) {

    /* Handle Grouping specially */
    if (fBookmarkGrouping.isActive() && element instanceof IEntity) {
      IEntity entity = (IEntity) element;
      EntityGroup[] groups = fBookmarkGrouping.group(Collections.singletonList(entity));
      if (groups.length == 1)
        return groups[0];
    }

View Full Code Here

      else if (selection instanceof EntityGroup) {
        EntityGroup group = (EntityGroup) selection;
        List<EntityGroupItem> items = group.getItems();
        for (EntityGroupItem item : items) {
          IEntity entity = item.getEntity();
          if (entity instanceof IBookMark) {
            IBookMark bookMark = (IBookMark) entity;
            selectedBookMarks.add(bookMark);
          } else if (entity instanceof INews) {
            INews news = (INews) entity;
View Full Code Here

    /* Separate News */
    final List<INews> newsToDelete = new ArrayList<INews>();

    /* Extract News */
    for (Iterator<IEntity> it = entities.iterator(); it.hasNext();) {
      IEntity element = it.next();

      /* Separate News */
      if (element instanceof INews) {
        it.remove();
        newsToDelete.add((INews) element);
View Full Code Here

TOP

Related Classes of org.rssowl.core.persist.IEntity

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.