PageBean.java
上传用户:liangcc
上传日期:2019-05-24
资源大小:4412k
文件大小:1k
- package com.softeem.webmail.tags;
- public class PageBean {
-
- private int current_page;
-
- private int total_count;
-
- private int show_count;
-
- private int first_page=1;
-
- private int last_page;
-
- private boolean has_up;
-
- private boolean has_down;
- public PageBean(int current_page, int total_count, int show_count) {
-
- this.current_page = current_page;
- this.total_count = total_count;
- this.show_count = show_count;
- }
- public int getCurrent_page() {
- return current_page;
- }
- public void setCurrent_page(int current_page) {
- this.current_page = current_page;
- }
- public int getTotal_count() {
- return total_count;
- }
- public void setTotal_count(int total_count) {
- this.total_count = total_count;
- }
- public int getShow_count() {
- return show_count;
- }
- public void setShow_count(int show_count) {
- this.show_count = show_count;
- }
- public int getLast_page() {
- if(getTotal_count()%getShow_count()!=0){
- return (getTotal_count()/getShow_count())+1;
- }else{
- return (getTotal_count()/getShow_count());
- }
- }
- public boolean isHas_up() {
- if(getCurrent_page()>1){
- return true;
-
- }
- return has_up;
- }
- public boolean isHas_down() {
- if(getCurrent_page()<getLast_page()){
-
- return true;
- }
- return has_down;
- }
- public int getFirst_page() {
- return 1;
- }
-
-
- }