Package com.google.appengine.api.datastore.Query

Examples of com.google.appengine.api.datastore.Query.SortDirection


      }

      @Override
      public Find<T> sort(String field, Find.Sort direction)
      {
        SortDirection dir;

        switch (direction)
        {
          case Ascending :
            dir = SortDirection.ASCENDING;
View Full Code Here


  }

  @Override
  public ListQueryResult getAll(String kind, String sortColumn, honeycrm.client.s.SortDirection sortDirection, int from, int to) {
    final Query q = new Query(kind);
    final SortDirection dir = sortDirection.equals(honeycrm.client.s.SortDirection.Ascending) ? SortDirection.ASCENDING : SortDirection.DESCENDING;
    q.addSort(sortColumn, dir);
    PreparedQuery pq = db.prepare(q);
    return copy.entitiesToDtoArray(kind, pq.countEntities(withDefaults()), pq.asIterable(withLimit(to - from + 1).offset(from)), false);
  }
View Full Code Here

      boolean moreSort = direction.endsWith(",");
      if (moreSort) {
        direction = direction.substring(0, direction.length() - 1);
      }

      SortDirection sd = null;
      if (direction.equals("ASC")) {
        sd = SortDirection.ASCENDING;
      } else if (direction.equals("DESC")) {
        sd = SortDirection.DESCENDING;
      } else {
View Full Code Here

  }

  /** Modifies the instance */
  void addOrder(String condition) {
    condition = condition.trim();
    SortDirection dir = SortDirection.ASCENDING;

    if (condition.startsWith("-")) {
      dir = SortDirection.DESCENDING;
      condition = condition.substring(1).trim();
    }
View Full Code Here

TOP

Related Classes of com.google.appengine.api.datastore.Query.SortDirection

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.