Package com.google.appengine.api.datastore

Examples of com.google.appengine.api.datastore.Query$Filter


    List<Filter> keyFilters = new ArrayList<Filter>();
    if (query.hasFilter()) {
      keyFilters.add(query.getFilter());
    }
    if (lastKey != null) {
      Filter lowerBound = DatastoreHelper.makeFilter(DatastoreHelper.KEY_PROPERTY_NAME,
          PropertyFilter.Operator.GREATER_THAN_OR_EQUAL,
          DatastoreHelper.makeValue(lastKey)).build();
      keyFilters.add(lowerBound);
    }
    if (nextKey != null) {
      Filter upperBound = DatastoreHelper.makeFilter(DatastoreHelper.KEY_PROPERTY_NAME,
          PropertyFilter.Operator.LESS_THAN,
          DatastoreHelper.makeValue(nextKey)).build();
      keyFilters.add(upperBound);
    }
    return Query.newBuilder(query).setFilter(makeFilter(keyFilters)).build();
View Full Code Here


  @Override
  public void removeByFile(final Long fileId) {
    if (fileId == null) {
      return;
    }
    Query q = newQuery();
    q.addFilter("fileId", EQUAL, fileId);
    removeSelected(q);
  }
View Full Code Here

    }
    return result;
  }
 
  private List<FileChunkEntity> getByFile(Long fileId) {
    Query q = newQuery();
    q.addFilter("fileId", EQUAL, fileId);
    List<FileChunkEntity> result = selectNotCache(q);
    Collections.sort(result, new Comparator<FileChunkEntity>() {
        @Override
        public int compare(FileChunkEntity o1, FileChunkEntity o2) {
          if (o1.getIndex() > o2.getIndex()) {
View Full Code Here

    super(PluginEntity.class);
  }

  @Override
  public PluginEntity getByName(final String name) {
    Query q = newQuery();
    q.addFilter("name", FilterOperator.EQUAL, name);
    return selectOne(q, "getByName", params(name));
  }
View Full Code Here

    return selectOne(q, "getByName", params(name));
  }
 
  @Override
  public List<PluginEntity> selectEnabled() {
    Query q = newQuery();
    q.addFilter("disabled", FilterOperator.EQUAL, false);
    return select(q, "selectEnabled", params(false));
  }
View Full Code Here

    super(FormEntity.class);
  }

  @Override
  public FormEntity getByName(final String name) {
    Query q = newQuery();
    q.addFilter("name", EQUAL, name);
    return selectOne(q, "getByName", params(name));
  }
View Full Code Here

        .getStructureTemplateDao();
  }
 
  @Override
  public StructureEntity getByTitle(String title) {
    Query q = newQuery();
    q.addFilter("title", FilterOperator.EQUAL, title);
    return selectOne(q, "getByTitle", params(title));
  }
View Full Code Here

    return getByPage(pageUrl, true);
  }

  private List<PageAttributeEntity> getByPage(final String pageUrl,
      Boolean inherited) {
    Query q = newQuery();
    q.addFilter("pageUrl", EQUAL, pageUrl);
    if (inherited != null) {
      q.addFilter("inherited", EQUAL, inherited);
    }
    return select(q, "getByPage", params(pageUrl, inherited));
  }
View Full Code Here

    return select(q, "getByPage", params(pageUrl, inherited));
  }

  @Override
  public void removeByPage(String url) {
    Query q = newQuery();
    q.addFilter("pageUrl", EQUAL, url);
    removeSelected(q);
  }
View Full Code Here

    removeSelected(q);
  }

  @Override
  public PageAttributeEntity getByPageName(String pageUrl, String name) {
    Query q = newQuery();
    q.addFilter("pageUrl", EQUAL, pageUrl);
    q.addFilter("name", EQUAL, name);
    return selectOne(q, "getByPageName", params(pageUrl, name));
  }
View Full Code Here

TOP

Related Classes of com.google.appengine.api.datastore.Query$Filter

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.