Package com.ponxu.blog4j.model

Examples of com.ponxu.blog4j.model.PageInfo


  }

  public List<Post> queryPublishLatestPost(int count) {
    String condition = PUBLISH_POST;
    String order = "id desc";
    PageInfo page = new PageInfo(1, count);

    return query(condition, order, page, false);
  }
View Full Code Here


  }

  public List<Post> queryPublishRelativePost(Post post, int count) {
    String condition = PUBLISH_POST;
    String order = "rand()";
    PageInfo page = new PageInfo(1, count);

    StringBuilder tagids = new StringBuilder("(");
    int i = 0;
    for (Tag tag : post.getTags()) {
      if (i > 0)
View Full Code Here

    }

    // 先设置分页(缓存可能需要)
    if (needPage()) {
      int page = getIntParam("page", 1);
      pageInfo = new PageInfo(page, Config.pageSize);
    }

    // 读取缓存
    Object cache = Cache.get(cacheKey());
    if (cache != null) {
View Full Code Here

    // 所有页面
    context.getRoot().put(
        "pages",
        postService.queryPublishPageByKeywords(null,
            new PageInfo(1, 10)));

    // 最新文章
    context.getRoot().put("latestPosts",
        postService.queryPublishLatestPost(10));
View Full Code Here

TOP

Related Classes of com.ponxu.blog4j.model.PageInfo

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.