/**
* 物件 分頁請求和響應實體 to
* * @author administrator 物件業務層封裝 提供setter 計算的資料 可以直接提供getter 計算出來
*/public
class paginationimplements serializable
public
void
setsize(int size)
public integer getpagesize()
public
void
setpagesize(integer pagesize)
public integer getpageno()
public
void
setpageno(integer pageno)
public integer getposstart()
public string getorderby()
public
void
setorderby(string orderby)
public string getdirection()
public
void
setdirection(string direction)
public listgetdata()
public
void
setdata(listdata)
public long gettotalcount()
public
void
settotalcount(long totalcount)
public long getpages()
// 起始記錄的計算
public
intgetstartindex()
public
intgetpagenum()
public
void
setpagenum(int pagenum)
/***
* 總頁碼
* *
* * @return
* */
public
intgettotalpages()
/***
* *
* * @return
* */
public
intgetbeforepage()
return
this.beforepage;
}public
intgetnextpage()
return
this.nextpage;}/*
* * 頁碼欄數值 6---15
* */
public
int getpagebar() else
if (endpage >= this.totalpages)
}// 定好 起始數字 末尾數字 計算 beginpage 4 pagenum 9 endpage = 13
this.pagebar = new
int[endpage - beginpage + 1];
int index = 0;
for (int i = beginpage; i <= endpage; i++)
// 分頁欄頁碼完成封裝了!
return
this.pagebar;
}public listgetpagerows()
public
void
setpagerows(listpagerows)
public
long
gettotalcounts()
public
void
settotalcounts(long totalcounts)
public long getallcase()
public
void
setallcase(long allcase)
public long getowncase()
public
void
setowncase(long owncase)
public long getothercase()
public
void
setothercase(long othercase)
public long getnocase()
public
void
setnocase(long nocase)
}
java的web開發分頁工具類
分頁處理 儲存工具類。public final static string current tag currentpage 當前頁數 public final static string pagination action tag paginationaction 快取操作 public final...
Java工具類 Java檔案工具類
public class fileutils 讀取檔案並作為byte返回 param file 目標檔案 return throws ioexception public static byte readfileasbytes file file throws ioexception 讀取檔案並作為...
JSP分頁工具類
頁面裡的一頁資料的物件 author bluceyoung public class pageutil 獲取總頁數 return public int getpagecount 獲取每頁資料條數 return public int getpagesize 獲取總資料條數 return public ...