Package org.rssowl.core.persist.service

Examples of org.rssowl.core.persist.service.PersistenceException


  public long countAll() {
    try {
      List<? extends T> entities = fDb.query(fEntityClass);
      return entities.size();
    } catch (Db4oException e) {
      throw new PersistenceException(e);
    }
  }
View Full Code Here


      Collection<INews> news = getList(query);
      activateAll(news);

      return new ArrayList<INews>(news);
    } catch (Db4oException e) {
      throw new PersistenceException(e);
    }
  }
View Full Code Here

          fSearcher = createIndexSearcher();
      }
    } catch (LockObtainFailedException e) {
      throw new ProfileLockedException(e.getMessage(), e);
    } catch (IOException e) {
      throw new PersistenceException(e.getMessage(), e);
    }
  }
View Full Code Here

        }

        fSearcher = null;
      }
    } catch (IOException e) {
      throw new PersistenceException(e.getMessage(), e);
    }
  }
View Full Code Here

    /* Use custom hit collector for performance reasons */
    try {
      currentSearcher.search(query, new SimpleHitCollector(currentSearcher, resultList));
      return resultList;
    } catch (IOException e) {
      throw new PersistenceException(e);
    }
  }
View Full Code Here

         * because dispose is safe to be called many times for the same
         * searcher.
         */
        dispose(currentSearcher);
      } catch (IOException e) {
        throw new PersistenceException(e);
      }
    }
  }
View Full Code Here

        BooleanQuery.setMaxClauseCount(MAX_CLAUSE_COUNT);
        return doSearchNews(conditions, scope, matchAllConditions);
      }

      /* Maximum reached */
      throw new PersistenceException(Messages.ModelSearchImpl_ERROR_WILDCARDS, e);
    }
  }
View Full Code Here

        return resultList;
      } finally {
        disposeIfNecessary(currentSearcher);
      }
    } catch (IOException e) {
      throw new PersistenceException(Messages.ModelSearchImpl_ERROR_SEARCH, e);
    }
  }
View Full Code Here

        }
        fSearchers.get(fSearcher).incrementAndGet();
        return fSearcher;
      }
    } catch (IOException e) {
      throw new PersistenceException(e.getMessage(), e);
    }
  }
View Full Code Here

               * We sleep with a lock held because the Threads that we're
               * waiting to make progress don't acquire a lock
               */
              Thread.sleep(100);
            } catch (InterruptedException e) {
              throw new PersistenceException("Failed to close IndexSearcher: " + fSearcher); //$NON-NLS-1$
            }
          }
        }
      }
    } catch (IOException e) {
      throw new PersistenceException(e.getMessage(), e);
    }
  }
View Full Code Here

TOP

Related Classes of org.rssowl.core.persist.service.PersistenceException

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.