Package org.rssowl.core.internal.persist.search

Examples of org.rssowl.core.internal.persist.search.ModelSearchImpl


        guids.add(newsItem.getGuid());
      else if (newsItem.getLink() != null)
        links.add(newsItem.getLink());
    }

    ModelSearchImpl modelSearch = (ModelSearchImpl) Owl.getPersistenceService().getModelSearch();
    Map<URI, List<NewsReference>> linkToNewsRefs = modelSearch.searchNewsByLinks(links, false, monitor);
    Map<IGuid, List<NewsReference>> guidToNewsRefs = modelSearch.searchNewsByGuids(guids, false, monitor);
    for (INews newsItem : news) {

      /* Return early on cancellation */
      if (monitor.isCanceled() || Owl.isShuttingDown())
        return;
View Full Code Here


  /*
   * @see org.rssowl.core.model.dao.IPersistenceService#getModelSearch()
   */
  public IModelSearch getModelSearch() {
    if (fModelSearch == null)
      fModelSearch = new ModelSearchImpl();

    return fModelSearch;
  }
View Full Code Here

    return news;
  }

  private List<INews> doSearchNews(INews newsItem, boolean guid) {
    ModelSearchImpl modelSearch = (ModelSearchImpl) Owl.getPersistenceService().getModelSearch();
    List<NewsReference> hits;
    if (guid)
      hits = modelSearch.searchNewsByGuid(newsItem.getGuid(), false);
    else
      hits = modelSearch.searchNewsByLink(newsItem.getLink(), false);

    List<INews> news = new ArrayList<INews>(hits.size());
    for (NewsReference hit : hits) {
      if (newsItem.getId() != null && (hit.getId() == newsItem.getId().longValue()))
        news.add(newsItem);
View Full Code Here

  /*
   * @see org.rssowl.core.model.dao.IPersistenceService#getModelSearch()
   */
  public IModelSearch getModelSearch() {
    if (fModelSearch == null)
      fModelSearch = new ModelSearchImpl();

    return fModelSearch;
  }
View Full Code Here

    return news;
  }

  private List<INews> doSearchNews(INews newsItem, boolean guid) {
    ModelSearchImpl modelSearch = (ModelSearchImpl) Owl.getPersistenceService().getModelSearch();
    List<NewsReference> hits;
    if (guid)
      hits = modelSearch.searchNewsByGuid(newsItem.getGuid(), false);
    else
      hits = modelSearch.searchNewsByLink(newsItem.getLink(), false);

    List<INews> news = new ArrayList<INews>(hits.size());
    for (NewsReference hit : hits) {
      if (newsItem.getId() != null && (hit.getId() == newsItem.getId().longValue()))
        news.add(newsItem);
View Full Code Here

  /*
   * @see org.rssowl.core.model.dao.IPersistenceService#getModelSearch()
   */
  public IModelSearch getModelSearch() {
    if (fModelSearch == null)
      fModelSearch = new ModelSearchImpl();

    return fModelSearch;
  }
View Full Code Here

    if (links.isEmpty() && guids.isEmpty())
      return;

    /* Search existing News by Links and GUIDs */
    ModelSearchImpl modelSearch = (ModelSearchImpl) Owl.getPersistenceService().getModelSearch();
    Map<URI, List<NewsReference>> linkToNewsRefs = modelSearch.searchNewsByLinks(links, false, monitor);
    Map<IGuid, List<NewsReference>> guidToNewsRefs = modelSearch.searchNewsByGuids(guids, false, monitor);
    for (INews item : news) {

      /* Return early on cancellation */
      if (monitor.isCanceled() || Owl.isShuttingDown())
        return;
View Full Code Here

TOP

Related Classes of org.rssowl.core.internal.persist.search.ModelSearchImpl

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.