• page工具类


    工具类

    /**
     * @Title: PageUtil.java
     * @Package
     * @Description: TODO(用一句话描述该文件做什么)
     * @author licy
     * @date 2018年11月8日
     * @version V1.0
     */
    
    public class PageUtil {
    	private int pageSize = 10;//count of everyPage data, default 10 
    	private int pageNo = 1;//the No of the page
    	private int totalCount;//count of all data 
    	private int totalPage;//count of all page
    
    	public int getPageSize() {
    		return pageSize;
    	}
    
    	public void setPageSize(int pageSize) {
    		this.pageSize = pageSize;
    	}
    
    	public int getPageNo() {
    		return pageNo;
    	}
    
    	public void setPageNo(int pageNo) {
    		this.pageNo = pageNo;
    	}
    
    	public int getTotalCount() {
    		return totalCount;
    	}
    
    	public void setTotalCount(int totalCount) {
    		this.totalCount = totalCount;
    	}
    
    	public int getTotalPage() {
    		return totalPage;
    	}
    
    	public void setTotalPage(int totalPage) {
    		totalPage = totalCount / pageSize;
    		if (totalCount % pageSize != 0) {
    			totalPage = totalPage + 1;
    		}
    	}
    
    }
    
  • 相关阅读:
    java反射小练习
    Set与list测试
    关于用户界面
    自定义标签打包使用问题
    jsp中获取当前访问路径
    LeetCode 汇总
    LeetCode 46. 全排列
    LeetCode 40.组合总和II
    LeetCode 39.组合总和
    LeetCode 37.解数独
  • 原文地址:https://www.cnblogs.com/lichangyunnianxue/p/9933715.html
Copyright © 2020-2023  润新知