Package org.beangle.commons.collection.page

Examples of org.beangle.commons.collection.page.PageLimit


    this.limit = limit;
    return this;
  }

  public OqlBuilder<T> limit(final int pageNo, final int pageSize) {
    this.limit = new PageLimit(pageNo, pageSize);
    return this;
  }
View Full Code Here


  public String activity() {
    OqlBuilder<SessionActivity> query = OqlBuilder.from(SessionActivity.class,
        "sessionActivity");
    query.where("sessionActivity.name=:name", getUsername());
    query.orderBy(Order.parse("sessionActivity.loginAt desc"));
    PageLimit limit = getPageLimit();
    limit.setPageSize(10);
    query.limit(limit);
    put("sessionActivities", entityDao.search(query));
    put("onlineActivities", sessionRegistry.getSessionInfos(getUser(), true));
    return forward();
  }
View Full Code Here

   * 从的参数或者cookie中(参数优先)取得分页信息
   *
   * @return
   */
  public static PageLimit getPageLimit() {
    PageLimit limit = new PageLimit();
    limit.setPageNo(getPageNo());
    limit.setPageSize(getPageSize());
    return limit;
  }
View Full Code Here

  private void populateSessioninfoLogs(User user) {
    OqlBuilder<SessioninfoLogBean> onlineQuery = OqlBuilder.from(SessioninfoLogBean.class,
        "sessioninfoLog");
    onlineQuery.where("sessioninfoLog.username = :username", user.getName());
    PageLimit limit = QueryHelper.getPageLimit();
    limit.setPageSize(5);
    onlineQuery.orderBy("sessioninfoLog.loginAt desc").limit(limit);
    ContextHelper.put("sessioninfoLogs", entityDao.search(onlineQuery));
  }
View Full Code Here

          table.setSchema(target.getSchema());
          target.pushData(table, Collections.emptyList());
          logger.info("replicate {} data {}", table, 0);
        } else {
          int curr = 0;
          PageLimit limit = new PageLimit(0, 5000);
          while (curr < count) {
            table.setSchema(sourceSchema);
            limit.setPageNo(limit.getPageNo() + 1);
            List<Object> data = source.getData(table, limit);
            table.setSchema(target.getSchema());
            int successed = target.pushData(table, data);
            curr += data.size();
            if (successed == data.size()) {
View Full Code Here

TOP

Related Classes of org.beangle.commons.collection.page.PageLimit

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.