Examples of descend()


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

  }

  public Description load(long newsId) {
    Query query = fDb.query();
    query.constrain(Description.class);
    query.descend("fNewsId").constrain(newsId); //$NON-NLS-1$
    Description description = getSingleResult(query);
    fDb.activate(description, Integer.MAX_VALUE);
    return description;
  }
View Full Code Here

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

  public IConditionalGet load(URI link) {
    Assert.isNotNull(link, "link cannot be null"); //$NON-NLS-1$
    try {
      Query query = fDb.query();
      query.constrain(fEntityClass);
      query.descend("fLink").constrain(link.toString()); //$NON-NLS-1$

      for (IConditionalGet entity : getList(query)) {
        fDb.activate(entity, Integer.MAX_VALUE);
        return entity;
      }
View Full Code Here

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

  }

  public IPreference load(String key) throws PersistenceException {
    Query query = fDb.query();
    query.constrain(fEntityClass);
    query.descend("fKey").constrain(key); //$NON-NLS-1$
    List<IPreference> prefs = getList(query);
    activateAll(prefs);
    if (!prefs.isEmpty()) {
      return prefs.iterator().next();
    }
View Full Code Here

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

  @Override
  protected void doDelete(ILabel entity) {
    Query query = fDb.query();
    query.constrain(News.class);
    query.descend("fLabels").constrain(entity); //$NON-NLS-1$
    @SuppressWarnings("unchecked")
    List<INews> news = query.execute();
    for (INews newsItem : news) {
      newsItem.removeLabel(entity);
    }
View Full Code Here

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

      return new ArrayList<INews>(0);

    try {
      Query query = fDb.query();
      query.constrain(News.class);
      query.descend("fFeedLink").constrain(feedRef.getLink().toString()); //$NON-NLS-1$
      query.descend("fParentId").constrain(0); //$NON-NLS-1$
      if (!states.containsAll(EnumSet.allOf(INews.State.class))) {
        Constraint constraint = null;
        for (INews.State state : states) {
          if (constraint == null)
View Full Code Here

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

    try {
      Query query = fDb.query();
      query.constrain(News.class);
      query.descend("fFeedLink").constrain(feedRef.getLink().toString()); //$NON-NLS-1$
      query.descend("fParentId").constrain(0); //$NON-NLS-1$
      if (!states.containsAll(EnumSet.allOf(INews.State.class))) {
        Constraint constraint = null;
        for (INews.State state : states) {
          if (constraint == null)
            constraint = query.descend("fStateOrdinal").constrain(state.ordinal()); //$NON-NLS-1$
View Full Code Here

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

      query.descend("fParentId").constrain(0); //$NON-NLS-1$
      if (!states.containsAll(EnumSet.allOf(INews.State.class))) {
        Constraint constraint = null;
        for (INews.State state : states) {
          if (constraint == null)
            constraint = query.descend("fStateOrdinal").constrain(state.ordinal()); //$NON-NLS-1$
          else
            constraint = query.descend("fStateOrdinal").constrain(state.ordinal()).or(constraint); //$NON-NLS-1$
        }
      }
View Full Code Here

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

        Constraint constraint = null;
        for (INews.State state : states) {
          if (constraint == null)
            constraint = query.descend("fStateOrdinal").constrain(state.ordinal()); //$NON-NLS-1$
          else
            constraint = query.descend("fStateOrdinal").constrain(state.ordinal()).or(constraint); //$NON-NLS-1$
        }
      }

      Collection<INews> news = getList(query);
      activateAll(news);
View Full Code Here

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

      query.constrain(News.class);
      if (!originalStates.containsAll(EnumSet.allOf(INews.State.class))) {
        Constraint constraint = null;
        for (INews.State originalState : originalStates) {
          if (constraint == null)
            constraint = query.descend("fStateOrdinal").constrain(originalState.ordinal()); //$NON-NLS-1$
          else
            constraint = query.descend("fStateOrdinal").constrain(originalState.ordinal()).or(constraint); //$NON-NLS-1$
        }
      }
View Full Code Here

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

        Constraint constraint = null;
        for (INews.State originalState : originalStates) {
          if (constraint == null)
            constraint = query.descend("fStateOrdinal").constrain(originalState.ordinal()); //$NON-NLS-1$
          else
            constraint = query.descend("fStateOrdinal").constrain(originalState.ordinal()).or(constraint); //$NON-NLS-1$
        }
      }

      Collection<INews> news = getList(query);
      activateAll(news);
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.