/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/package com.github.pagehelper;import java.io.Serializable;import java.util.Collection;import java.util.List;/**
* 对Page<E>结果进行包装
* <p/>
* 新增分页的多项属性,主要参考:http://bbs.csdn.net/topics/360010907
*
* @author liuzh/abel533/isea533
* @version 3.3.0
* @since 3.2.2
* 项目地址 : http://git.oschina.net/free/Mybatis_PageHelper
*/@SuppressWarnings({"rawtypes","unchecked"})publicclassPageInfo<T>implementsSerializable{privatestaticfinallong serialVersionUID =1L;//当前页privateint pageNum;//每页的数量privateint pageSize;//当前页的数量privateint size;//由于startRow和endRow不常用,这里说个具体的用法//可以在页面中"显示startRow到endRow 共size条数据"//当前页面第一个元素在数据库中的行号privateint startRow;//当前页面最后一个元素在数据库中的行号privateint endRow;//总记录数privatelong total;//总页数privateint pages;//结果集private List<T> list;//前一页privateint prePage;//下一页privateint nextPage;//是否为第一页privateboolean isFirstPage =false;//是否为最后一页privateboolean isLastPage =false;//是否有前一页privateboolean hasPreviousPage =false;//是否有下一页privateboolean hasNextPage =false;//导航页码数privateint navigatePages;//所有导航页号privateint[] navigatepageNums;//导航条上的第一页privateint navigateFirstPage;//导航条上的最后一页privateint navigateLastPage;publicPageInfo(){}}