Examples of merge()


Examples of org.rssowl.core.model.types.IFeed.merge()

   */
  @Test
  public void testSaveFeedTwiceAfterMerging() {
    try {
      IFeed savedFeed = fModelDAO.saveFeed(createFeed());
      savedFeed = savedFeed.merge(createFeed());
      fModelDAO.saveFeed(savedFeed);
    } catch (PersistenceException e) {
      TestUtils.fail(e);
    }
  }
View Full Code Here

Examples of org.rssowl.core.model.types.INews.merge()

    for (int i = 0, c = fNews.size(); i < c; ++i) {
      INews existingNews = fNews.get(i);
      int existingNewsIndex = findNews(newsListCopy, existingNews);

      if (existingNewsIndex > -1) {
        mergeResult.addAll(existingNews.merge(newsListCopy.get(existingNewsIndex)));
        newsListCopy.remove(existingNewsIndex);
      } else if ((newsToCleanUp != null) && (existingNews.getState() == INews.State.DELETED))
        newsToCleanUp.add(Integer.valueOf(i));
   
    }
View Full Code Here

Examples of org.rssowl.core.persist.IFeed.merge()

    INews news = fFactory.createNews(null, feed, new Date());
    news.setTitle(newsTitle);
    news.setPublishDate(new Date());

    IFeed mergedFeed = feedRef.resolve();
    mergedFeed.merge(feed);
    feedRef = new FeedReference(DynamicDAO.save(mergedFeed).getId());
    assertEquals("Same News was added twice!", 1, feedRef.resolve().getNews().size());
    assertEquals("Existing News State changed unexpectedly!", INews.State.NEW, feedRef.resolve().getNews().get(0).getState());

    /* b) Different publish date and news to be merged is in DELETED state */
 
View Full Code Here

Examples of org.rssowl.core.persist.INews.merge()

    for (int i = 0, c = fNews.size(); i < c; ++i) {
      INews existingNews = fNews.get(i);
      int existingNewsIndex = findNews(newsListCopy, existingNews);

      if (existingNewsIndex > -1) {
        mergeResult.addAll(existingNews.merge(newsListCopy.get(existingNewsIndex)));
        newsListCopy.remove(existingNewsIndex);
      } else if ((newsToCleanUp != null) && (existingNews.getState() == INews.State.DELETED))
        newsToCleanUp.add(Integer.valueOf(i));

    }
View Full Code Here

Examples of org.rssowl.core.util.SyncItem.merge()

  public void addUncommitted(Collection<SyncItem> items) {
    synchronized (fLock) {
      for (SyncItem item : items) {
        SyncItem existingItem = fItems.get(item.getId());
        if (existingItem != null)
          existingItem.merge(item);
        else
          fItems.put(item.getId(), item);
      }
    }
  }
View Full Code Here

Examples of org.sdnplatform.sync.internal.version.VectorClock.merge()

                List<String> strings = new ArrayList<String>();
                for (Versioned<List<String>> item : items) {
                    if (vc == null)
                        vc = (VectorClock)item.getVersion();
                    else
                        vc = vc.merge((VectorClock)item.getVersion());
                   
                    strings.addAll(item.getValue());
                }
                Versioned<List<String>> v =
                        new Versioned<List<String>>(strings, vc);
View Full Code Here

Examples of org.sonar.api.measures.Metric.merge()

  }

  private void persistMetricWithoutClear(Metric metric) {
    Metric dbMetric = getMetric(metric);
    if (dbMetric != null) {
      dbMetric.merge(metric);
      session.getEntityManager().merge(dbMetric);

    } else {
      session.getEntityManager().persist(new Metric().merge(metric));
    }
View Full Code Here

Examples of org.springframework.beans.Mergeable.merge()

  private void addOrMergeIndexedArgumentValue(Integer key, ValueHolder newValue) {
    ValueHolder currentValue = this.indexedArgumentValues.get(key);
    if (currentValue != null && newValue.getValue() instanceof Mergeable) {
      Mergeable mergeable = (Mergeable) newValue.getValue();
      if (mergeable.isMergeEnabled()) {
        newValue.setValue(mergeable.merge(currentValue.getValue()));
      }
    }
    this.indexedArgumentValues.put(key, newValue);
  }
View Full Code Here

Examples of org.springframework.core.env.ConfigurableEnvironment.merge()

      values.put(fullyQualifiedKey(moduleDefinition, name), nakedPS.getProperty(name));
    }
    EnumerablePropertySource<?> modulePS = new MapPropertySource(propertySourceName, values);
    ConfigurableEnvironment moduleEnvironment = new StandardEnvironment();
    // Append the rootEnvironment
    moduleEnvironment.merge(rootEnvironment);
    // The global environment has been loaded by boot too and
    // its PS of interest was also named "applicationConfigurationProperties"
    moduleEnvironment.getPropertySources().addBefore(APPLICATION_CONFIGURATION_PROPERTIES, modulePS);
    return moduleEnvironment;
  }
View Full Code Here

Examples of org.springframework.core.env.StandardEnvironment.merge()

      values.put(fullyQualifiedKey(moduleDefinition, name), nakedPS.getProperty(name));
    }
    EnumerablePropertySource<?> modulePS = new MapPropertySource(propertySourceName, values);
    ConfigurableEnvironment moduleEnvironment = new StandardEnvironment();
    // Append the rootEnvironment
    moduleEnvironment.merge(rootEnvironment);
    // The global environment has been loaded by boot too and
    // its PS of interest was also named "applicationConfigurationProperties"
    moduleEnvironment.getPropertySources().addBefore(APPLICATION_CONFIGURATION_PROPERTIES, modulePS);
    return moduleEnvironment;
  }
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.