Examples of descend()


Examples of com.db4o.query.Query.descend()

  @SuppressWarnings("unchecked")
  private List<INews> getNewsFromLink(INews newsItem) {
    Query query = fDb.query();
    query.constrain(News.class);
    query.descend("fLinkText").constrain(newsItem.getLink().toString()); //$NON-NLS-1$
    return activateAll(query.execute());
  }

  @SuppressWarnings("unchecked")
  private List<INews> getNewsFromGuid(INews newsItem) {
View Full Code Here

Examples of com.db4o.query.Query.descend()

  @SuppressWarnings("unchecked")
  private List<INews> getNewsFromGuid(INews newsItem) {
    Query query = fDb.query();
    query.constrain(News.class);
    query.descend("fGuidValue").constrain(newsItem.getGuid().getValue()); //$NON-NLS-1$
    return activateAll(query.execute());
  }

  private void saveFeed(MergeResult mergeResult) {
    for (Object o : mergeResult.getRemovedObjects()) {
View Full Code Here

Examples of com.db4o.query.Query.descend()

    DynamicDAO.save(newsCopy);
    DynamicDAO.save(newsBin);

    Query query = fDb.query();
    query.constrain(News.class);
    query.descend("fParentId").constrain(0).not();
    List<?> newsCopies = query.execute();
    assertEquals(1, newsCopies.size());
    assertEquals(newsCopy, newsCopies.get(0));

    query = fDb.query();
View Full Code Here

Examples of com.db4o.query.Query.descend()

    assertEquals(1, newsCopies.size());
    assertEquals(newsCopy, newsCopies.get(0));

    query = fDb.query();
    query.constrain(News.class);
    query.descend("fParentId").constrain(0);
    List<?> newsList = query.execute();
    assertEquals(1, newsList.size());
    assertEquals(news, newsList.get(0));

    query = fDb.query();
View Full Code Here

Examples of com.db4o.query.Query.descend()

    assertEquals(1, newsList.size());
    assertEquals(news, newsList.get(0));

    query = fDb.query();
    query.constrain(News.class);
    query.descend("fGuidValue").constrain(news.getGuid().getValue());
    query.descend("fParentId").constrain(0).not();
    newsCopies = query.execute();
    assertEquals(1, newsCopies.size());
    assertEquals(newsCopy, newsCopies.get(0));
View Full Code Here

Examples of com.db4o.query.Query.descend()

    assertEquals(news, newsList.get(0));

    query = fDb.query();
    query.constrain(News.class);
    query.descend("fGuidValue").constrain(news.getGuid().getValue());
    query.descend("fParentId").constrain(0).not();
    newsCopies = query.execute();
    assertEquals(1, newsCopies.size());
    assertEquals(newsCopy, newsCopies.get(0));

    query = fDb.query();
View Full Code Here

Examples of com.db4o.query.Query.descend()

    assertEquals(1, newsCopies.size());
    assertEquals(newsCopy, newsCopies.get(0));

    query = fDb.query();
    query.constrain(News.class);
    query.descend("fGuidValue").constrain(news.getGuid().getValue());
    query.descend("fParentId").constrain(0);
    newsList = query.execute();
    assertEquals(1, newsList.size());
    assertEquals(news, newsList.get(0));
  }
View Full Code Here

Examples of com.db4o.query.Query.descend()

    assertEquals(newsCopy, newsCopies.get(0));

    query = fDb.query();
    query.constrain(News.class);
    query.descend("fGuidValue").constrain(news.getGuid().getValue());
    query.descend("fParentId").constrain(0);
    newsList = query.execute();
    assertEquals(1, newsList.size());
    assertEquals(news, newsList.get(0));
  }
View Full Code Here

Examples of com.db4o.query.Query.descend()

    List<IEntity> entities = db.query(IEntity.class);
    assertEquals(entities.size(), defragmentedDb.query(IEntity.class).size());
    for (IEntity entity : entities) {
      Query query = defragmentedDb.query();
      query.constrain(entity.getClass());
      query.descend("fId").constrain(Long.valueOf(entity.getId())); //$NON-NLS-1$

      List<?> result = query.execute();
      assertEquals(1, result.size());
      assertEquals(entity, result.get(0));
View Full Code Here

Examples of com.db4o.query.Query.descend()

    List<INews> newsList = db.query(INews.class);
    assertEquals(newsList.size(), defragmentedDb.query(INews.class).size());
    for (INews news : newsList) {
      Query query = defragmentedDb.query();
      query.constrain(news.getClass());
      query.descend("fId").constrain(Long.valueOf(news.getId())); //$NON-NLS-1$

      List<INews> result = query.execute();
      assertEquals(1, result.size());
      assertEquals(news.getTitle(), result.get(0).getTitle());
    }
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.