Package org.rssowl.core.persist.service

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


  public boolean exists(long id) {
    try {
      return !(loadList(id).isEmpty());
    } catch (Db4oException e) {
      throw new PersistenceException(e);
    }
  }
View Full Code Here


      // with this.
      fDb.activate(entity, Integer.MAX_VALUE);

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

      mark.setPopularity(mark.getPopularity() + 1);
      preSave(mark);
      fDb.ext().store(mark, 1);
      fDb.commit();
    } catch (Db4oException e) {
      throw new PersistenceException(e);
    } finally {
      fWriteLock.unlock();
    }
    DBHelper.cleanUpAndFireEvents();
  }
View Full Code Here

      mark.setPopularity(mark.getPopularity() + 1);
      preSave(mark);
      fDb.ext().store(mark, 1);
      fDb.commit();
    } catch (Db4oException e) {
      throw new PersistenceException(e);
    } finally {
      fWriteLock.unlock();
    }
    DBHelper.cleanUpAndFireEvents();
  }
View Full Code Here

      for (IConditionalGet entity : getList(query)) {
        fDb.activate(entity, Integer.MAX_VALUE);
        return entity;
      }
    } catch (Db4oException e) {
      throw new PersistenceException(e);
    }
    return null;
  }
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

      List<? extends T> entities = fDb.query(fEntityClass);
      activateAll(entities);

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

  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

          condition.signal();
          setStateLock.unlock();
          save(changedNews);
          fDb.commit();
        } catch (Db4oException e) {
          throw new PersistenceException(e);
        } finally {
          if (changedNews != null) {
            for (INews changedNewsItem : changedNews) {
              ((News) changedNewsItem).releaseReadLockSpecial();
              eventRunnable.addCheckedUpdateEvent(createSaveEventTemplate(changedNewsItem));
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.