?? pagebean.java
字號:
package com.st0705.erp.base;
public class PageBean{
private int pag;//當(dāng)前顯示第幾頁
private int first;//從第幾頁開始
private int size;//查詢最多條數(shù)
private int count;//獲取查詢所有記錄條數(shù)
private int total;//共有幾頁
public int getFirst() {
return first;
}
public void setFirst(int first) {
this.first = first;
}
public int getPag() {
return pag;
}
public void setPag(int pag) {
if(pag<=0){
this.first=0;
this.pag=0;
}else if(pag>=total){
if(count%size==0){
this.first=count-size;
}else{
this.size=count%size;
this.first=count-size;
}
this.pag=total-1;
}else{
this.first=(pag)*size;
this.pag=pag;
}
}
public int getSize() {
return size;
}
public void setSize(int size) {
this.size = size;
}
public int getCount() {
return count;
}
public void setCount(int count) {
this.count=count;
if(count%size==0){
total=(int)(Math.ceil(count/size));
}else{
total=(int)(Math.ceil(count/size)+1);
}
}
public int getTotal() {
return total;
}
public void setTotal(int total) {
this.total = total;
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -