Package org.rssowl.core.persist.service

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


   */
  public void optimize() {
    try {
      fIndexer.optimize();
    } catch (IOException e) {
      throw new PersistenceException(e.getMessage(), e);
    }
  }
View Full Code Here


   */
  public void reIndexOnNextStartup() throws PersistenceException {
    try {
      DBManager.getDefault().getReIndexFile().createNewFile();
    } catch (IOException e) {
      throw new PersistenceException(e);
    }
  }
View Full Code Here

    /* Remove News to Delete from Index */
    synchronized (fIndexer) {
      try {
        fIndexer.removeFromIndex(newsToDelete);
      } catch (IOException e) {
        throw new PersistenceException(e.getMessage(), e);
      }
    }

    /* Finished */
    monitor.done();
View Full Code Here

   */
  public void cleanUpOnNextStartup() throws PersistenceException {
    try {
      DBManager.getDefault().getCleanUpIndexFile().createNewFile();
    } catch (IOException e) {
      throw new PersistenceException(e);
    }
  }
View Full Code Here

  @Override
  public final Collection<IFeed> loadAll() {
    try {
      return DBHelper.loadAllFeeds(fDb);
    } catch (Db4oException e) {
      throw new PersistenceException(e);
    }
  }
View Full Code Here

    try {
      Collection<IBookMark> marks = DBHelper.loadAllBookMarks(fDb, feedRef);
      activateAll(marks);
      return new ArrayList<IBookMark>(marks);
    } catch (Db4oException e) {
      throw new PersistenceException(e);
    }
  }
View Full Code Here

  public boolean exists(FeedLinkReference feedRef) {
    try {
      Collection<IBookMark> marks = DBHelper.loadAllBookMarks(fDb, feedRef);
      return !marks.isEmpty();
    } catch (Db4oException e) {
      throw new PersistenceException(e);
    }
  }
View Full Code Here

          strings.add(person.getEmail().toString());
      }

      return strings;
    } catch (Db4oException e) {
      throw new PersistenceException(e);
    }
  }
View Full Code Here

    try {
      long lastBackupTimestamp = Long.parseLong(DBHelper.readFirstLineFromFile(fBackupTimestampFile));
      long now = System.currentTimeMillis();
      return (now - lastBackupTimestamp) >= fBackupFrequency.longValue();
    } catch (NumberFormatException e) {
      throw new PersistenceException(fBackupTimestampFile.getAbsolutePath() + " does not contain a number for the date as expected", e); //$NON-NLS-1$
    }
  }
View Full Code Here

    if (!fBackupTimestampFile.exists()) {
      try {
        fBackupTimestampFile.createNewFile();
      } catch (IOException e) {
        throw new PersistenceException("Failed to create new file", e); //$NON-NLS-1$
      }
    }
    DBHelper.writeToFile(fBackupTimestampFile, String.valueOf(System.currentTimeMillis()));
  }
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.