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

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


     */
    public Sort[] getSorts() {
        List<SortPredicate> list = query.getSortPredicates();
        Sort[] sorts = new Sort[list.size()];
        for (int i = 0; i < list.size(); i++) {
            SortPredicate s = list.get(i);
            sorts[i] = new Sort(s.getPropertyName(), s.getDirection());
        }
        return sorts;
    }
View Full Code Here


     */
    public Sort[] getSorts() {
        List<SortPredicate> list = query.getSortPredicates();
        Sort[] sorts = new Sort[list.size()];
        for (int i = 0; i < list.size(); i++) {
            SortPredicate s = list.get(i);
            sorts[i] = new Sort(s.getPropertyName(), s.getDirection());
        }
        return sorts;
    }
View Full Code Here

     */
    public Sort[] getSorts() {
        List<SortPredicate> list = query.getSortPredicates();
        Sort[] sorts = new Sort[list.size()];
        for (int i = 0; i < list.size(); i++) {
            SortPredicate s = list.get(i);
            sorts[i] = new Sort(s.getPropertyName(), s.getDirection());
        }
        return sorts;
    }
View Full Code Here

    assertEquals(new FilterPredicate("c", FilterOperator.LESS_THAN, 100), actual.getFilterPredicates().get(1));
    assertEquals(new FilterPredicate("d", FilterOperator.EQUAL, new Date(2011 - 1900, 10, 17, 10, 10, 10)), actual.getFilterPredicates().get(2));
   
    // order by
    assertEquals(3, actual.getSortPredicates().size());
    assertEquals(new SortPredicate("d", SortDirection.ASCENDING), actual.getSortPredicates().get(0));
    assertEquals(new SortPredicate("e", SortDirection.ASCENDING), actual.getSortPredicates().get(1));
    assertEquals(new SortPredicate("f", SortDirection.DESCENDING), actual.getSortPredicates().get(2));
   
    // limit
    assertEquals(new Integer(1000), gql.fetchOptions().getLimit());
   
    // offset
View Full Code Here

TOP

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

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.