Package com.google.appengine.api.datastore

Examples of com.google.appengine.api.datastore.FetchOptions


      q.addFilter("fecha", FilterOperator.LESS_THAN_OR_EQUAL, ayer2);
      q.addFilter("negocio", FilterOperator.EQUAL, idNegocio);
      q.addSort("fecha", SortDirection.DESCENDING);
      q.addSort("equipoNombre", SortDirection.ASCENDING);

      FetchOptions fetchOptions = FetchOptions.Builder.withDefaults();

      List<Entity> entities = datastore.prepare(q).asList(fetchOptions);

      for (Entity entity : entities) {
        Text comentario = (Text) entity.getProperty("comentario");
View Full Code Here


      q.addFilter("negocio", FilterOperator.EQUAL, idNegocio);
     
      q.addSort("fecha", SortDirection.DESCENDING);
      q.addSort("orden", SortDirection.ASCENDING);

      FetchOptions fetchOptions = FetchOptions.Builder.withDefaults();

      List<Entity> entities = datastore.prepare(q).asList(fetchOptions);

      for (Entity entity : entities) {
        Key key=entity.getKey();
View Full Code Here

      q
      .addFilter(
          "idNovedad",
          com.google.appengine.api.datastore.Query.FilterOperator.EQUAL,
          Long.valueOf(idNovedad));
      FetchOptions fetchOptions = FetchOptions.Builder.withDefaults();
      PreparedQuery pq = datastore.prepare(q);
      results=pq.asList(fetchOptions);
     
    } catch (Exception e) {
      log.error("DAO " + e.getMessage());
View Full Code Here

        q.addFilter("equipo", FilterOperator.EQUAL, idEquipo);
      }

      q.addSort("fecha", SortDirection.DESCENDING);

      FetchOptions fetchOptions = FetchOptions.Builder.withDefaults();

      List<Entity> entities = datastore.prepare(q).asList(fetchOptions);
      for (Entity entity : entities) {
        Text comentario = (Text) entity.getProperty("comentario");
        if (comentario.getValue() != null && comentario.getValue().trim().length()>0) {
View Full Code Here

    Query query = new Query("BitacoraLN");
    query.addFilter("fecha", FilterOperator.EQUAL, fecha);
    query.addFilter("comentario", FilterOperator.NOT_EQUAL, "");
    query.addFilter("equipo", FilterOperator.EQUAL, idEquipo);
    query.addFilter("turno", FilterOperator.EQUAL, idTurno);
    FetchOptions fetchOptions = FetchOptions.Builder.withDefaults();
    PreparedQuery pq = datastore.prepare(query);
    return pq.countEntities(fetchOptions);
  }   
View Full Code Here

        Query q = new Query(UsuarioLN.class.getSimpleName());

        q.addFilter("correo", FilterOperator.EQUAL, new Boolean(true));

        FetchOptions fetchOptions = FetchOptions.Builder.withDefaults();

        List<Entity> entities = datastore.prepare(q).asList(
            fetchOptions);

        Properties props = new Properties();
View Full Code Here

      query.setFilter(new FilterPredicate(KEY_RESERVED_PROPERTY, GREATER_THAN_OR_EQUAL, keyPrefix));
      prefixLength = prefix.length();
    } else {
      prefixLength = 0;
    }
    FetchOptions fetchOptions = FetchOptions.Builder.withDefaults();
    if (marker != null) {
      fetchOptions.startCursor(Cursor.fromWebSafeString(marker));
    }
    List<ListItem> items = new ArrayList<>(maxResults);
    Set<String> prefixes = new HashSet<>();
    QueryResultIterator<Entity> dsResults =
        DATASTORE.prepare(query).asQueryResultIterator(fetchOptions);
View Full Code Here

  public final void deleteAll(Type type)
  {
    Query query = createQuery(type);
    query.setKeysOnly();
    FetchOptions options = FetchOptions.Builder.withChunkSize(100);
    Iterator<Entity> entities = servicePrepare(query).asIterator(options);
    Iterator<Key> keys = Iterators.transform(entities, entityToKeyFunction);
    Iterator<List<Key>> partitioned = Iterators.partition(keys, 100);
    while (partitioned.hasNext())
    {
View Full Code Here

  protected int getFetchSize()
  {
    @SuppressWarnings("deprecation")
    int fetch = FetchOptions.DEFAULT_CHUNK_SIZE;
    FetchOptions fetchOptions = childCommand.getRootCommand().getFetchOptions();
    if (fetchOptions != null)
    {
      if (fetchOptions.getChunkSize() != fetchOptions.getPrefetchSize())
      {
        throw new IllegalArgumentException("Must have same fetchFirst and fetchNextBy to get parents");
      }
      fetch = fetchOptions.getChunkSize();
    }
    return fetch;
  }
View Full Code Here

  private QueryResultIterator<Entity> nowSingleQueryEntities(Query query)
  {
    final QueryResultIterator<Entity> entities;
    PreparedQuery prepared = this.datastore.servicePrepare(query);
    FetchOptions fetchOptions = getRootCommand().getFetchOptions();
    if (fetchOptions == null)
    {
      entities = prepared.asQueryResultIterator();
    }
    else
View Full Code Here

TOP

Related Classes of com.google.appengine.api.datastore.FetchOptions

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.