-
大小: 122KB文件类型: .rar金币: 1下载: 0 次发布日期: 2021-06-10
- 语言: 其他
- 标签: 淘淘商城 pagehelper
资源简介
直接导入eclipse ,运行run ——>maven install即可
代码片段和文件信息
/*
The MIT License (MIT)
Copyright (c) 2014 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 org.apache.ibatis.session.RowBounds;
import java.util.ArrayList;
import java.util.List;
/**
* Mybatis - 分页对象
*
* @author liuzh/abel533/isea533
* @version 3.3.0
* 项目地址 : http://git.oschina.net/free/Mybatis_PageHelper
*/
public class Page extends ArrayList {
private static final long serialVersionUID = 1L;
/**不进行count查询*/
private static final int NO_SQL_COUNT = -1;
/**进行count查询*/
private static final int SQL_COUNT = 0;
/**页码,从1开始*/
private int pageNum;
/**页面大小*/
private int pageSize;
/**起始行*/
private int startRow;
/**末行*/
private int endRow;
/**总数*/
private long total;
/**总页数*/
private int pages;
/**分页合理化*/
private boolean reasonable;
public Page(){
super();
}
public Page(int pageNum int pageSize) {
this(pageNum pageSize SQL_COUNT);
}
public Page(int pageNum int pageSize boolean count) {
this(pageNum pageSize count ? Page.SQL_COUNT : Page.NO_SQL_COUNT);
}
public Page(int pageNum int pageSize int total) {
super(pageSize > -1 ? pageSize : 0);
this.pageNum = pageNum;
this.pageSize = pageSize;
this.total = total;
calculateStartAndEndRow();
}
public Page(RowBounds rowBounds boolean count) {
this(rowBounds count ? Page.SQL_COUNT : Page.NO_SQL_COUNT);
}
public Page(RowBounds rowBounds int total) {
super(rowBounds.getLimit() > -1 ? rowBounds.getLimit() : 0);
this.pageSize = rowBounds.getLimit();
this.startRow = rowBounds.getOffset();
//RowBounds方式默认不求count总数,如果想求count可以修改这里为SQL_COUNT
this.total = total;
this.endRow = this.startRow + this.pageSize;
}
publi
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1097 2017-05-26 08:18 pagehelper\.classpath
文件 1031 2015-07-21 18:18 pagehelper\.project
文件 93 2015-07-21 17:47 pagehelper\.settings\org.eclipse.core.resources.prefs
文件 430 2015-07-21 18:17 pagehelper\.settings\org.eclipse.jdt.core.prefs
文件 90 2015-07-21 17:45 pagehelper\.settings\org.eclipse.m2e.core.prefs
文件 322 2015-07-21 18:17 pagehelper\.settings\org.eclipse.wst.common.component
文件 172 2015-07-21 18:17 pagehelper\.settings\org.eclipse.wst.common.project.facet.core.xm
文件 50 2015-07-21 18:18 pagehelper\.settings\org.eclipse.wst.validation.prefs
文件 3 2015-07-21 18:20 pagehelper\.svn\entries
文件 3 2015-07-21 18:20 pagehelper\.svn\format
文件 5278 2015-07-21 18:21 pagehelper\.svn\pristine\1e\1ed8f80c3c7a36920d0dba314c21d516c3c0b15d.svn-ba
文件 1102 2015-07-21 18:21 pagehelper\.svn\pristine\24\24a42c92f927bc14b6c491294bcc3f82e5a7599e.svn-ba
文件 8316 2015-07-21 18:21 pagehelper\.svn\pristine\5c\5cbaa2369a5f0427f3bf0996e6ece86082b670c3.svn-ba
文件 7897 2015-07-21 18:21 pagehelper\.svn\pristine\c9\c9f1011bf3e0c72277efb820f3cd49e7543b7512.svn-ba
文件 24310 2015-07-21 18:21 pagehelper\.svn\pristine\d4\d427d1626be0317b84847ca3878f5d437e2c3676.svn-ba
文件 7777 2015-07-21 18:21 pagehelper\.svn\pristine\f6\f6aa43c51aa60233b1e57120022f0787e90f7961.svn-ba
文件 39936 2015-07-21 18:22 pagehelper\.svn\wc.db
文件 1102 2015-07-21 18:16 pagehelper\pom.xm
文件 5278 2015-07-21 17:48 pagehelper\src\main\java\com\github\pagehelper\Page.java
文件 7897 2015-07-21 17:48 pagehelper\src\main\java\com\github\pagehelper\PageHelper.java
文件 7777 2015-07-21 17:48 pagehelper\src\main\java\com\github\pagehelper\PageInfo.java
文件 8316 2015-07-21 17:48 pagehelper\src\main\java\com\github\pagehelper\SqlParser.java
文件 24310 2015-07-21 18:11 pagehelper\src\main\java\com\github\pagehelper\SqlUtil.java
文件 4146 2017-05-26 08:19 pagehelper\target\classes\com\github\pagehelper\Page.class
文件 4778 2017-05-26 08:19 pagehelper\target\classes\com\github\pagehelper\PageHelper.class
文件 6102 2017-05-26 08:19 pagehelper\target\classes\com\github\pagehelper\PageInfo.class
文件 8765 2017-05-26 08:19 pagehelper\target\classes\com\github\pagehelper\SqlParser.class
文件 1044 2017-05-26 08:19 pagehelper\target\classes\com\github\pagehelper\SqlUtil$1.class
文件 1318 2017-05-26 08:19 pagehelper\target\classes\com\github\pagehelper\SqlUtil$Dialect.class
文件 1956 2017-05-26 08:19 pagehelper\target\classes\com\github\pagehelper\SqlUtil$HsqldbParser.class
............此处省略55个文件信息
- 上一篇:WEB数据管理总结.docx
- 下一篇:禁止电脑端模拟手机网页js脚本
相关资源
- springboot+mybatis+pagehelper、web前端到后台
- 淘淘商城taotao-image-server.7z文件
- 29期-淘淘商城-百度云盘.txt
- 淘淘商城项目视频以及代码
- 淘淘商城参考资料
- 淘淘商城04-项目配置文件
- SpringBoot2.1.4+Mybatis+PageHelper整合
- FastDFS单机版图片服务器17年淘淘商城
- pagehelper完善包
- 淘淘商城网盘地址.txt
- 淘淘商城dubbo版全套
- 传智播客 最新版淘淘商城视频教程及
- 淘淘商城图片服务器.txt
- 淘淘商城.txt
- 淘淘商城项目有源码
- taotao_image_server_133淘淘商城15年视频的
- 淘淘商城云盘地址.txt
- Spring SpringMVC MyBatis淘淘商城项目完整
- 淘淘商城项目源码+视频+资料
- 传智播客-29期-淘淘商城-张志君-Dubb
- pagehelper
- 淘淘商城第三天笔记
评论
共有 条评论