Package org.rssowl.core.persist

Examples of org.rssowl.core.persist.IEntity


      return true;

    if ((obj == null) || (obj.getClass() != getClass()))
      return false;

    IEntity type = (IEntity) obj;
    if (fId == null || type.getId() == null)
      return false;

    return fId.equals(type.getId());
  }
View Full Code Here


    eventRegistry.deleting().addListener(deletingListener);
    eventRegistry.deleted().addListener(deletedListener);
  }

  private void processActivated(EventArgs args) {
    IEntity entity = getEntity(args);
    if (entity == null)
      return;

    if (entity instanceof News)
      ((News) entity).init();
View Full Code Here

  private void initBookMark(BookMark entity) {
    entity.setNewsCounter(getNewsCounterDAO().load());
  }

  private void processUpdatedEvent(EventArgs args) {
    IEntity entity = getEntity(args);
    if (entity == null)
      return;

    ModelEvent event = createModelEvent(entity);
    if (event != null)
View Full Code Here

   * News deleted, needs to delete description
   * on handle feed reloaded, if description.getValue is null, delete
   */

  private void processCreatingEvent(EventArgs args) {
    IEntity entity = getEntity(args);

    if (entity != null) {
      setId(entity);
      if (entity instanceof BookMark)
        initBookMark((BookMark) entity);
View Full Code Here

        initBookMark((BookMark) entity);
    }
  }

  private void processCreatedEvent(EventArgs args) {
    IEntity entity = getEntity(args);
    if (entity == null)
      return;

    ModelEvent event = createModelEvent(entity);
    if (event != null)
View Full Code Here

    if (event != null)
      EventsMap.getInstance().putPersistEvent(event);
  }

  private void processDeletingEvent(EventArgs args) {
    IEntity entity = getEntity(args);
    if (entity == null)
      return;

    if (entity instanceof INews)
      cascadeNewsDeletion((INews) entity);
View Full Code Here

      }
    }
  }

  private void processDeletedEvent(EventArgs args) {
    IEntity entity = getEntity(args);
    if (entity == null)
      return;

    ModelEvent event = createModelEvent(entity);
    if (event != null)
View Full Code Here

  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

            needToSave = true;
            inputPrefs.delete(DefaultPreferences.NM_SELECTED_NEWS);
          }
        }

        IEntity entityToSave;
        if (fInput.getMark() instanceof FolderNewsMark)
          entityToSave = ((FolderNewsMark) fInput.getMark()).getFolder();
        else
          entityToSave = fInput.getMark();
View Full Code Here

  /*
   * @see org.rssowl.ui.dialogs.properties.IEntityPropertyPage#performOk(java.util.Set)
   */
  public boolean performOk(Set<IEntity> entitiesToSave) {
    if (fEntities.size() == 1) {
      IEntity entity = fEntities.get(0);

      Object oldNotesObj = entity.getProperty(NOTES_PREF_ID);
      String oldNotes = (oldNotesObj != null) ? oldNotesObj.toString() : ""; //$NON-NLS-1$
      String newNotes = fNotesInput.getText();

      boolean save = false;

      if (!StringUtils.isSet(newNotes) && StringUtils.isSet(oldNotes)) {
        entity.removeProperty(NOTES_PREF_ID);
        save = true;
      } else if (!newNotes.equals(oldNotes)) {
        entity.setProperty(NOTES_PREF_ID, newNotes);
        save = true;
      }

      if (save)
        entitiesToSave.add(entity);
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.