Examples of addSort()


Examples of com.codetroopers.play.elasticsearch.jest.JestSearchRequestBuilder.addSort()

            request.addFacet(facet);
        }

        // Sorting
        for (SortBuilder sort : sorts) {
            request.addSort(sort);
        }

        // Paging
        if (from > -1) {
            request.setFrom(from);
View Full Code Here

Examples of com.dodo.blog.request.ArticlesRequest.addSort()

        @Override
        public List<Article> getRows( int firstRow, int maxRows, String orderBy, OrderDirection direction )
        {
            ArticlesRequest request = new ArticlesRequest( firstRow, maxRows );
            request.addSort( orderBy, direction );
            return articleService.getArticles( request );
        }
    }
}
View Full Code Here

Examples of com.dodo.blog.request.BasicRequest.addSort()

        @Override
        public List<Playground> getRows( int firstRow, int maxRows, String orderBy, OrderDirection direction )
        {
            BasicRequest request = new BasicRequest( firstRow, maxRows );
            request.addSort( orderBy, direction );
            return playgroundService.getPlaygroundList( request );
        }
    }
}
View Full Code Here

Examples of com.dodo.blog.request.BasicRequest.addSort()

        @Override
        public List<Category> getRows( int firstRow, int maxRows, String orderBy, OrderDirection direction )
        {
            BasicRequest request = new BasicRequest( firstRow, maxRows );
            request.addSort( orderBy, direction );
            return categoryService.getCategoryList( request );
        }
    }
}
View Full Code Here

Examples of com.dodo.blog.request.BasicRequest.addSort()

        @Override
        public List<Tag> getRows( int firstRow, int maxRows, String orderBy, OrderDirection direction )
        {
            BasicRequest request = new BasicRequest( firstRow, maxRows );
            request.addSort( orderBy, direction );
            return tagService.getTagList( request );
        }
    }
}
View Full Code Here

Examples of com.dotcms.repackage.org.elasticsearch.action.search.SearchRequestBuilder.addSort()

            if(offset>0)
                srb.setFrom(offset);

            if(UtilMethods.isSet(sortBy)) {
              if(sortBy.equals("random")) {
                srb.addSort(SortBuilders.scriptSort("Math.random()", "number"));
              }
              else if(sortBy.endsWith("-order")) {
                  // related content ordering
                  int ind0=sortBy.indexOf('-'); // relationships tipicaly have a format stname1-stname2
                  int ind1=ind0>0 ? sortBy.indexOf('-',ind0+1) : -1;
View Full Code Here

Examples of com.google.appengine.api.datastore.Query.addSort()

  }

  public List<CourseInformationObject> getCourseList(DepartmentInformationObject dio) {
    Query q = new Query(COURSE_KIND);
    q.addFilter(DEPARTMENT_ID_PROPERTY, FilterOperator.EQUAL, dio.getDepartmentId());
    q.addSort(DEPARTMENT_ID_PROPERTY, SortDirection.ASCENDING);
    q.addSort(COURSE_ID_PROPERTY, SortDirection.ASCENDING);
    List<Entity> cel = datastore.prepare(q).asList(FetchOptions.Builder.withDefaults());
    List<CourseInformationObject> ciol = new ArrayList<CourseInformationObject>();
    for (Iterator i = cel.iterator(); i.hasNext();) {
      Entity e = (Entity) i.next();
View Full Code Here

Examples of com.google.appengine.api.datastore.Query.addSort()

  public List<CourseInformationObject> getCourseList(DepartmentInformationObject dio) {
    Query q = new Query(COURSE_KIND);
    q.addFilter(DEPARTMENT_ID_PROPERTY, FilterOperator.EQUAL, dio.getDepartmentId());
    q.addSort(DEPARTMENT_ID_PROPERTY, SortDirection.ASCENDING);
    q.addSort(COURSE_ID_PROPERTY, SortDirection.ASCENDING);
    List<Entity> cel = datastore.prepare(q).asList(FetchOptions.Builder.withDefaults());
    List<CourseInformationObject> ciol = new ArrayList<CourseInformationObject>();
    for (Iterator i = cel.iterator(); i.hasNext();) {
      Entity e = (Entity) i.next();
      CourseInformationObject cio = getCourseFromEntity(e);
View Full Code Here

Examples of com.google.appengine.api.datastore.Query.addSort()

  public List<SectionInformationObject> getSectionList(CourseInformationObject cio) {
    Query q = new Query(SECTION_KIND);
    q.addFilter(DEPARTMENT_ID_PROPERTY, FilterOperator.EQUAL, cio.getDepartmentId());
    q.addFilter(COURSE_ID_PROPERTY, FilterOperator.EQUAL, cio.getCourseId());
    q.addSort(DEPARTMENT_ID_PROPERTY, SortDirection.ASCENDING);
    q.addSort(COURSE_ID_PROPERTY, SortDirection.ASCENDING);
    q.addSort(SECTION_ID_PROPERTY, SortDirection.ASCENDING);   
    List<Entity> sel = datastore.prepare(q).asList(FetchOptions.Builder.withDefaults());
    List<SectionInformationObject> siol = new ArrayList<SectionInformationObject>();
    for (Iterator i = sel.iterator(); i.hasNext();) {
View Full Code Here

Examples of com.google.appengine.api.datastore.Query.addSort()

  public List<SectionInformationObject> getSectionList(CourseInformationObject cio) {
    Query q = new Query(SECTION_KIND);
    q.addFilter(DEPARTMENT_ID_PROPERTY, FilterOperator.EQUAL, cio.getDepartmentId());
    q.addFilter(COURSE_ID_PROPERTY, FilterOperator.EQUAL, cio.getCourseId());
    q.addSort(DEPARTMENT_ID_PROPERTY, SortDirection.ASCENDING);
    q.addSort(COURSE_ID_PROPERTY, SortDirection.ASCENDING);
    q.addSort(SECTION_ID_PROPERTY, SortDirection.ASCENDING);   
    List<Entity> sel = datastore.prepare(q).asList(FetchOptions.Builder.withDefaults());
    List<SectionInformationObject> siol = new ArrayList<SectionInformationObject>();
    for (Iterator i = sel.iterator(); i.hasNext();) {
      Entity e = (Entity) i.next();
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.