下面是分页思想,一个初始化方法和一个分页实现方法:
分页的util类:
package com.sy.util;
import java.util.List;
@SuppressWarnings("unchecked")
public class Page {
private int pageSize;
private int totalPage;
private int rowCount;
private int currentPage;
private int prePage;
private int nextPage;
private boolean hasNextPage;
private boolean hasPreviousPage;
private List list;
public Page() {
this.pageSize=10;
}
public int getPageSize() {
return pageSize;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public int getTotalPage() {
return totalPage;
}
public void setTotalPage(int totalPage) {
this.totalPage = totalPage;
}
public int getRowCount() {
return rowCount;
}
public void setRowCount(int rowCount) {
this.rowCount = rowCount;
}
public int getCurrentPage() {
return currentPage;
}
public void setCurrentPage(int currentPage) {
this.currentPage = currentPage;
}
public int getPrePage() {
return prePage;
}
public void setPrePage(int prePage) {
this.prePage = prePage;
}
public int getNextPage() {
return nextPage;
}
public void setNextPage(int nextPage) {
this.nextPage = nextPage;
}
public boolean isHasNextPage() {
return hasNextPage;
}
public void setHasNextPage(boolean hasNextPage) {
this.hasNextPage = hasNextPage;
}
public boolean isHasPreviousPage() {
return hasPreviousPage;
}
public void setHasPreviousPage(boolean hasPreviousPage) {
this.hasPreviousPage = hasPreviousPage;
}
public List getList() {
return list;
}
public void setList(List list) {
this.list = list;
}
}
SSH超实用分页实现!
转载上一篇:spring mvc 内存泄露
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
超实用的AI论文工具推荐
推荐几个硬核的AI论文工具
学术论文 AIGC AI工具 -
技术解密Java Chassis 3超实用的可观测性
本文将解密如何使用Java Chassis 3可观测能力来快速定位问题,以及这个能力是如何构建起来的。
数据 问题定位 ServiceComb 微服务 Java Chassis 3 -
【SSH】java真分页实现
一、前言 分页显示这个功能可以说是非常的实用,毫不夸大的说,只要我们涉及到网页,
java asp.net .net ajax ssh -
在ssh中实现分页排序
ssh的分页排序这个demo是我从平时的一个项目里提取出来的, 单独拿出来,供
在ssh中实现分页排序 java hibernate apache