Examples of Paginator


Examples of com.couchbase.client.protocol.views.Paginator

   * @param docsPerPage the amount of documents per page.
   * @return A Paginator (iterator) to use for reading the results of the query.
   */
  @Override
  public Paginator paginatedQuery(View view, Query query, int docsPerPage) {
    return new Paginator(this, view, query, docsPerPage);
  }
View Full Code Here

Examples of com.couchbase.client.protocol.views.Paginator

    }
  }

  @Override
  public Paginator paginatedQuery(View view, Query query, int docsPerPage) {
    return new Paginator(this, view, query, docsPerPage);
  }
View Full Code Here

Examples of com.couchbase.client.protocol.views.Paginator

    }
  }

  @Override
  public Paginator paginatedQuery(View view, Query query, int docsPerPage) {
    return new Paginator(this, view, query, docsPerPage);
  }
View Full Code Here

Examples of com.github.miemiedev.mybatis.paginator.domain.Paginator

                            cache.putObject(cacheKey, count);
                        }
                    }else{
                        count = SQLHelp.getCount(ms,parameter,boundSql,dialect);
                    }
                    return new Paginator(pageBounds.getPage(), pageBounds.getLimit(), count);
                }
            };
            Future<Paginator> countFutrue = call(countTask, async);
            return new PageList(listFuture.get(),countFutrue.get());
        }
View Full Code Here

Examples of com.github.miemiedev.mybatis.paginator.domain.Paginator

        this.mapper = mapper;
    }
    @Override
    public void serialize(PageList value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException {
        Map<String,Object> map = new HashMap<String, Object>();
        Paginator paginator = value.getPaginator();
        map.put("totalCount", paginator.getTotalCount());
        map.put("totalPages", paginator.getTotalPages());
        map.put("page", paginator.getPage());
        map.put("limit", paginator.getLimit());
        map.put("items" , new ArrayList(value));

        map.put("startRow", paginator.getStartRow());
        map.put("endRow", paginator.getEndRow());

        map.put("offset", paginator.getOffset());

        map.put("slider", paginator.getSlider());

        map.put("prePage", paginator.getPrePage());
        map.put("nextPage", paginator.getNextPage());

        map.put("firstPage", paginator.isFirstPage());
        map.put("hasNextPage", paginator.isHasNextPage());
        map.put("hasPrePage", paginator.isHasPrePage());
        map.put("lastPage", paginator.isLastPage());

        mapper.writeValue(jgen, map);
    }
View Full Code Here

Examples of com.scooterframework.orm.misc.Paginator

     * <tt>index</tt> method returns a list of <tt>entries</tt> records.
     * If the value of <tt>paged</tt> parameter is <tt>true</tt>, a paginated list is returned.
     */
    public String index() {
        if ("true".equals(p(Constants.PAGED))) {
            Paginator page = jdbcPaginator(Entry.class, params());
            setViewData("entry_page", page);
            return renderView("paged_list");
        }
        setViewData("entries", Entry.findAll());
        return null;
View Full Code Here

Examples of com.scooterframework.orm.misc.Paginator

     * <tt>index</tt> method returns a list of <tt>entries</tt> records.
     * If the value of <tt>paged</tt> parameter is <tt>true</tt>, a paginated list is returned.
     */
    public String index() {
        if ("true".equals(p(Constants.PAGED))) {
            Paginator page = jdbcPaginator(Entry.class, params());
            setViewData("entry_page", page);
            return renderView("paged_list");
        }
        setViewData("entries", Entry.findAll());
        return null;
View Full Code Here

Examples of com.scooterframework.orm.misc.Paginator

     * <tt>index</tt> method returns a list of <tt>pets</tt> records.
     * If the value of <tt>paged</tt> parameter is <tt>true</tt>, a paginated list is returned.
     */
    public String index() {
        if ("true".equals(params(Constants.PAGED))) {
            Paginator page = jdbcPaginator(Pet.class, params());
            storeToRequest("pet_page", page);
            return forwardTo(viewPath("paged_list"));
        }
        storeToRequest("pets", Pet.findAll());
        return null;
View Full Code Here

Examples of com.scooterframework.orm.misc.Paginator

     * <tt>index</tt> method returns a list of <tt>owners</tt> records.
     * If the value of <tt>paged</tt> parameter is <tt>true</tt>, a paginated list is returned.
     */
    public String index() {
        if ("true".equals(p(Constants.PAGED))) {
            Paginator page = jdbcPaginator(Owner.class, params());
            setViewData("owner_page", page);
            return renderView("paged_list");
        }
        setViewData("owners", Owner.includes("pets").getRecords());
        return null;
View Full Code Here

Examples of com.scooterframework.orm.misc.Paginator

      try {
          if (sql != null && !"".equals(sql)) {
              if (isSelectSQL(sql) && "true".equals(p(Constants.PAGED))) {
                Map<String, String> pagingOptions = Converters.convertMapToMapSS(ACH.getAC().getParameterDataAsMap());
                pagingOptions.put("limit", limit);
                Paginator page = new Paginator(new SqlPageListSourceImpl(database, sql), pagingOptions);
                    setViewData("paged_records", page);
                    return ActionResult.forwardTo(viewPath("paged_list"));
              }
              else {
                  Map<String, Object> inputs = new HashMap<String, Object>();
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.