Package org.rssowl.core.persist.dao

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


      public void entitiesUpdated(Set<SearchConditionEvent> events) {
        refreshIfRequired(events);
      }

      private void refreshIfRequired(Set<SearchConditionEvent> events) {
        ISearchMarkDAO dao = DynamicDAO.getDAO(ISearchMarkDAO.class);
        for (SearchConditionEvent event : events) {
          ISearchCondition condition = event.getEntity();
          ISearchMark searchMark = dao.load(condition);
          if (searchMark != null && searchMark.equals(fInput.getMark())) {
            JobRunner.runUIUpdater(new UIBackgroundJob(fParent) {
              @Override
              protected void runInBackground(IProgressMonitor monitor) {
                fContentProvider.refreshCache(new IMark[] { fInput.getMark() }, false);
View Full Code Here


    searchCondition0 = null;
    System.gc();

    /* Verify */
    searchCondition0 = searchCondRef0.resolve();
    ISearchMarkDAO dao = DynamicDAO.getDAO(ISearchMarkDAO.class);
    searchMark0 = dao.load(searchCondition0);
    assertEquals(searchMark0Id, searchMark0.getId());

    assertEquals(searchMark1, dao.load(searchCondition2));
  }
View Full Code Here

      if (lastVisitDate == null) {
        lastVisitDate = new Date();
      }
      Thread.sleep(100);

      ISearchMarkDAO dao = DynamicDAO.getDAO(ISearchMarkDAO.class);
      DynamicDAO.addEntityListener(ISearchCondition.class, listener);
      dao.visited(searchMark);
      searchMark = null;
      System.gc();

      searchMark = searchMarkRef.resolve();
      assertEquals(popularity + 1, searchMark.getPopularity());
View Full Code Here

      }

      /* We rely on the implementation detail that updating a SM means deleting/adding conditions */
      private void refreshIfRequired(Set<SearchConditionEvent> events) {
        if (fInput.getMark() instanceof ISearchMark) {
          ISearchMarkDAO dao = DynamicDAO.getDAO(ISearchMarkDAO.class);
          for (SearchConditionEvent event : events) {
            ISearchCondition condition = event.getEntity();
            ISearchMark searchMark = dao.load(condition);
            if (searchMark != null && searchMark.equals(fInput.getMark())) {
              JobRunner.runUIUpdater(new UIBackgroundJob(fParent) {
                @Override
                protected void runInBackground(IProgressMonitor monitor) {
                  if (!Controller.getDefault().isShuttingDown())
View Full Code Here

      }

      /* We rely on the implementation detail that updating a SM means deleting/adding conditions */
      private void refreshIfRequired(Set<SearchConditionEvent> events) {
        if (fInput.getMark() instanceof ISearchMark) {
          ISearchMarkDAO dao = DynamicDAO.getDAO(ISearchMarkDAO.class);
          for (SearchConditionEvent event : events) {
            ISearchCondition condition = event.getEntity();
            ISearchMark searchMark = dao.load(condition);
            if (searchMark != null && searchMark.equals(fInput.getMark())) {
              JobRunner.runUIUpdater(new UIBackgroundJob(fParent) {
                @Override
                protected void runInBackground(IProgressMonitor monitor) {
                  if (!Controller.getDefault().isShuttingDown())
View Full Code Here

    searchCondition0 = null;
    System.gc();

    /* Verify */
    searchCondition0 = searchCondRef0.resolve();
    ISearchMarkDAO dao = DynamicDAO.getDAO(ISearchMarkDAO.class);
    searchMark0 = dao.load(searchCondition0);
    assertEquals(searchMark0Id, searchMark0.getId());

    assertEquals(searchMark1, dao.load(searchCondition2));
  }
View Full Code Here

      if (lastVisitDate == null) {
        lastVisitDate = new Date();
      }
      Thread.sleep(100);

      ISearchMarkDAO dao = DynamicDAO.getDAO(ISearchMarkDAO.class);
      DynamicDAO.addEntityListener(ISearchCondition.class, listener);
      dao.visited(searchMark);
      searchMark = null;
      System.gc();

      searchMark = searchMarkRef.resolve();
      assertEquals(popularity + 1, searchMark.getPopularity());
View Full Code Here

TOP

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

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.