Package org.rssowl.core.persist.event

Examples of org.rssowl.core.persist.event.NewsBinEvent


        if (mark instanceof IBookMark)
          markEvent = new BookMarkEvent((IBookMark) mark, oldParent, true);
        else if (mark instanceof ISearchMark)
          markEvent = new SearchMarkEvent((ISearchMark) mark, oldParent, true);
        else if (mark instanceof INewsBin)
          markEvent = new NewsBinEvent((INewsBin) mark, oldParent, true);
        else
          throw new IllegalArgumentException("Unknown IMark subclass found: " + child.getClass()); //$NON-NLS-1$

        DBHelper.putEventTemplate(markEvent);
        markEvents.add(markEvent);
View Full Code Here


    super(NewsBin.class, true);
  }

  @Override
  protected NewsBinEvent createSaveEventTemplate(INewsBin entity) {
    return new NewsBinEvent(entity, null, true);
  }
View Full Code Here

      INewsBinDAO newsBinDAO = DynamicDAO.getDAO(INewsBinDAO.class);
      for (Map.Entry<Long, List<StatesUpdateInfo>> mapEntry : statesUpdateInfos.entrySet()) {
        INewsBin newsBin = newsBinDAO.load(mapEntry.getKey());
        if (newsBin.updateNewsStates(mapEntry.getValue())) {
          removeNews(db, removedFeedRefs, newsBin.removeNews(EnumSet.of(INews.State.DELETED)));
          putEventTemplate(new NewsBinEvent(newsBin, null, true));
          db.ext().store(newsBin, Integer.MAX_VALUE);
        }
      }
      removeFeedsAfterNewsBinUpdate(db, removedFeedRefs);
    }
View Full Code Here

      IFolder oldParent = eventTemplate == null ? null : eventTemplate.getOldParent();
      modelEvent = new SearchMarkEvent(mark, oldParent, root);
    }
    else if (entity instanceof INewsBin) {
      INewsBin newsBin = (INewsBin) entity;
      NewsBinEvent eventTemplate = (NewsBinEvent) template;
      IFolder oldParent = eventTemplate == null ? null : eventTemplate.getOldParent();
      modelEvent = new NewsBinEvent(newsBin, oldParent, root);
    }
    else if (entity instanceof IFolder) {
      IFolder folder = (IFolder) entity;
      FolderEvent eventTemplate = (FolderEvent) template;
      IFolder oldParent = eventTemplate == null ? null : eventTemplate.getOldParent();
      modelEvent = new FolderEvent(folder, oldParent, root);
    }
    else if (entity instanceof ILabel) {
      ILabel label = (ILabel) entity;
      LabelEvent eventTemplate = (LabelEvent) template;
      ILabel oldLabel = eventTemplate == null ? null : eventTemplate.getOldLabel();
      modelEvent = new LabelEvent(oldLabel, label, root);
    }
    else if (entity instanceof ISearchCondition) {
      ISearchCondition searchCond = (ISearchCondition) entity;
      modelEvent = new SearchConditionEvent(searchCond, root);
View Full Code Here

   * org.rssowl.core.internal.persist.dao.AbstractEntityDAO#createSaveEventTemplate
   * (org.rssowl.core.persist.IEntity)
   */
  @Override
  protected NewsBinEvent createSaveEventTemplate(INewsBin entity) {
    return new NewsBinEvent(entity, null, true);
  }
View Full Code Here

      SearchMarkEvent eventTemplate = (SearchMarkEvent) template;
      IFolder oldParent = eventTemplate == null ? null : eventTemplate.getOldParent();
      modelEvent = new SearchMarkEvent(mark, oldParent, root);
    } else if (entity instanceof INewsBin) {
      INewsBin newsBin = (INewsBin) entity;
      NewsBinEvent eventTemplate = (NewsBinEvent) template;
      IFolder oldParent = eventTemplate == null ? null : eventTemplate.getOldParent();
      modelEvent = new NewsBinEvent(newsBin, oldParent, root);
    } else if (entity instanceof IFolder) {
      IFolder folder = (IFolder) entity;
      FolderEvent eventTemplate = (FolderEvent) template;
      IFolder oldParent = eventTemplate == null ? null : eventTemplate.getOldParent();
      modelEvent = new FolderEvent(folder, oldParent, root);
    } else if (entity instanceof ILabel) {
      ILabel label = (ILabel) entity;
      LabelEvent eventTemplate = (LabelEvent) template;
      ILabel oldLabel = eventTemplate == null ? null : eventTemplate.getOldLabel();
      modelEvent = new LabelEvent(oldLabel, label, root);
    } else if (entity instanceof ISearchCondition) {
      ISearchCondition searchCond = (ISearchCondition) entity;
      modelEvent = new SearchConditionEvent(searchCond, root);
    } else if (entity instanceof IPreference) {
View Full Code Here

      INewsBinDAO newsBinDAO = DynamicDAO.getDAO(INewsBinDAO.class);
      for (Map.Entry<Long, List<StatesUpdateInfo>> mapEntry : statesUpdateInfos.entrySet()) {
        INewsBin newsBin = newsBinDAO.load(mapEntry.getKey());
        if (newsBin.updateNewsStates(mapEntry.getValue())) {
          removeNews(db, removedFeedRefs, newsBin.removeNews(EnumSet.of(INews.State.DELETED)));
          putEventTemplate(new NewsBinEvent(newsBin, null, true));
          db.ext().set(newsBin, Integer.MAX_VALUE);
        }
      }
      removeFeedsAfterNewsBinUpdate(db, removedFeedRefs);
    }
View Full Code Here

        if (mark instanceof IBookMark)
          markEvent = new BookMarkEvent((IBookMark) mark, oldParent, true);
        else if (mark instanceof ISearchMark)
          markEvent = new SearchMarkEvent((ISearchMark) mark, oldParent, true);
        else if (mark instanceof INewsBin)
          markEvent = new NewsBinEvent((INewsBin) mark, oldParent, true);
        else
          throw new IllegalArgumentException("Unknown IMark subclass found: " + child.getClass()); //$NON-NLS-1$

        DBHelper.putEventTemplate(markEvent);
        markEvents.add(markEvent);
View Full Code Here

TOP

Related Classes of org.rssowl.core.persist.event.NewsBinEvent

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.