-
大小: 122KB文件類型: .rar金幣: 2下載: 0 次發(fā)布日期: 2021-06-10
- 語言: 其他
- 標(biāo)簽: 淘淘商城??pagehelper??
資源簡介
直接導(dǎo)入eclipse ,運(yùn)行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
?*??????????項(xiàng)目地址?:?http://git.oschina.net/free/Mybatis_PageHelper
?*/
public?class?Page?extends?ArrayList?{
????private?static?final?long?serialVersionUID?=?1L;
????/**不進(jìn)行count查詢*/
????private?static?final?int?NO_SQL_COUNT?=?-1;
????/**進(jìn)行count查詢*/
????private?static?final?int?SQL_COUNT?=?0;
????/**頁碼,從1開始*/
????private?int?pageNum;
????/**頁面大小*/
????private?int?pageSize;
????/**起始行*/
????private?int?startRow;
????/**末行*/
????private?int?endRow;
????/**總數(shù)*/
????private?long?total;
????/**總頁數(shù)*/
????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方式默認(rèn)不求count總數(shù),如果想求count可以修改這里為SQL_COUNT
????????this.total?=?total;
????????this.endRow?=?this.startRow?+?this.pageSize;
????}
????publi
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????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個(gè)文件信息
評論
共有 條評論