ActionBean.java
上传用户:liangcc
上传日期:2019-05-24
资源大小:4412k
文件大小:2k
- package com.softeem.page;
- public class ActionBean {
- // 当前页面
- private int current_page;
- // 信息总数
- private int all_message;
- // 是否有下一页面
- private boolean next_page;
- // 是否有上一页面
- private boolean upone_page;
- // 第一页面
- private int first_page;
- // 最后一个页面
- private int last_page;
- // 每一个页面有的信息数
- private int message;
- public ActionBean(int current_page, int all_message, int message) {
- super();
- this.current_page = current_page;
- this.all_message = all_message;
- this.message = message;
- }
- public int getLast_page() {
- if (all_message <= 10) {
- last_page = 1;
- } else {
- if (all_message % message != 0) {
- last_page = (all_message / message) + 1;
- } else {
- last_page = all_message / message;
- }
- }
- return last_page;
- }
- public void setLast_page(int last_page) {
- this.last_page = last_page;
- }
- public int getCurrent_page() {
- return current_page;
- }
- public void setCurrent_page(int current_page) {
- this.current_page = current_page;
- }
- public int getAll_message() {
- return all_message;
- }
- public void setAll_page(int all_message) {
- this.all_message = all_message;
- }
- public int getmessage() {
- return message;
- }
- public void setPage(int message) {
- this.message = message;
- }
- public boolean isNext_page() {
- if (current_page < getLast_page()) {
- return true;
- }
- return false;
- }
- public boolean isUpone_page() {
- if (current_page > 1) {
- return true;
- }
- return false;
- }
- }