Examples of PaginationInfo


Examples of com.puppetlabs.geppetto.forge.v3.PaginationInfo

    currentMonitor = progressMonitor;
    try {
      PaginatedResult<T> page = list(query, sortBy, null, includeDeleted);
      progressMonitor.beginTask(page.getTotal());

      PaginationInfo pi = visitPage(page, visitor, progressMonitor);
      while(pi != null)
        pi = visitPage(list(query, sortBy, pi, includeDeleted), visitor, progressMonitor);

      if(!progressMonitor.isCanceled())
        progressMonitor.endTask();
View Full Code Here

Examples of com.puppetlabs.geppetto.forge.v3.PaginationInfo

          result.add(entity);
        }
      };

      try {
        PaginationInfo pi = visitPage(page, visitor, monitor);
        while(pi != null)
          pi = visitPage(list(query, sortBy, pi, includeDeleted), visitor, monitor);
      }
      catch(InvocationTargetException e) {
        // The visitor never throws that
View Full Code Here

Examples of com.puppetlabs.geppetto.forge.v3.PaginationInfo

  }

  protected void testList(ForgeService.Compare<T> query) throws IOException {
    PaginatedResult<T> result = getService().list(query, null, null, false);
    assertNotNull("Null result", result);
    PaginationInfo nxt = result.getNext();
    assertNotNull("Null pagination for next page", nxt);
    List<T> entries = result.getResults();
    assertNotNull("Null result list", entries);
    assertFalse("Empty list", entries.isEmpty());
View Full Code Here

Examples of com.puppetlabs.geppetto.forge.v3.PaginationInfo

    if(left <= 0)
      return null;
    if(limit > left)
      limit = left;

    return new PaginationInfo(last, limit);
  }
View Full Code Here

Examples of com.puppetlabs.geppetto.forge.v3.PaginationInfo

      return null;
    int limit = pagination.getLimit();
    if(limit > offset)
      limit = offset;
    offset -= limit;
    return new PaginationInfo(offset - limit, limit);
  }
View Full Code Here

Examples of org.jboss.aerogear.controller.router.rest.pagination.PaginationInfo

    }
   
    private void processPaged(RouteContext routeContext, Map<String, Object> arguments) throws Exception {
        final Route route = routeContext.getRoute();
        final PagingStrategy pagingStrategy = getPagingStrategy(route, arguments);
        final PaginationInfo paginationInfo = pagingStrategy.getPaginationInfo();
        final List<Object> pagingArgs = merge(paginationInfo, arguments);
        final Object result = route.getTargetMethod().invoke(getController(route), pagingArgs.toArray());
        responders.respond(routeContext, pagingStrategy.process(result, routeContext));
    }
View Full Code Here

Examples of sagan.support.nav.PaginationInfo

        Pageable pageable = PageableFactory.forSearch(page);
        SearchResults searchResults = searchService.search(searchForm.getQ(), pageable, searchForm.getFilters());
        Page<SearchResult> entries = searchResults.getPage();
        model.addAttribute("totalResultsCount", entries.getTotalElements());
        model.addAttribute("results", entries.getContent());
        model.addAttribute("paginationInfo", new PaginationInfo(entries));
        SearchFacet root = new SpringFacetsBuilder(searchResults.getFacets()).build();
        model.addAttribute("rootFacet", root);
        model.addAttribute("searchForm", searchForm);
        return "search/results";
    }
View Full Code Here

Examples of sagan.support.nav.PaginationInfo

        Page<PostView> postViewPage = PostView.pageOf(page, dateFactory);
        List<PostView> posts = postViewPage.getContent();
        model.addAttribute("activeCategory", activeCategory);
        model.addAttribute("categories", PostCategory.values());
        model.addAttribute("posts", posts);
        model.addAttribute("paginationInfo", new PaginationInfo(postViewPage));
        model.addAttribute("disqusShortname", service.getDisqusShortname());
        return "blog/index";
    }
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.