package kr.wisestone.owl.vo;
|
|
public class ResPage {
|
/** 현재 페이지 */
|
private int page;
|
/** 페이지 로우 */
|
private int pageSize;
|
private int totalPage;
|
/** 전체 로우 카운트 */
|
private long totalCount;
|
|
public ResPage() {
|
}
|
|
/**
|
* @param page
|
* @param pageSize
|
* @param totalPage
|
* @param totalCount
|
*/
|
public ResPage(int page, int pageSize, int totalPage, long totalCount) {
|
this.page=page;
|
this.pageSize=pageSize;
|
this.totalPage=totalPage;
|
this.totalCount=totalCount;
|
}
|
|
public ResPage(int page, int pageSize, int totalCount) {
|
this.page=page;
|
this.pageSize=pageSize;
|
this.totalCount=totalCount;
|
|
this.totalPage = 0;
|
|
this.totalPage = totalCount / pageSize;
|
if (totalCount % pageSize > 0) {
|
this.totalPage += 1;
|
}
|
}
|
|
/**
|
* @return the page
|
*/
|
public int getPage() {
|
return this.page;
|
}
|
/**
|
* @param page the page to set
|
*/
|
public void setPage(int page) {
|
this.page = page;
|
}
|
/**
|
* @return the pageSize
|
*/
|
public int getPageSize() {
|
return this.pageSize;
|
}
|
/**
|
* @param pageSize the pageSize to set
|
*/
|
public void setPageSize(int pageSize) {
|
this.pageSize = pageSize;
|
}
|
/**
|
* @return the totalPage
|
*/
|
public int getTotalPage() {
|
return this.totalPage;
|
}
|
/**
|
* @param totalPage the totalPage to set
|
*/
|
public void setTotalPage(int totalPage) {
|
this.totalPage = totalPage;
|
}
|
/**
|
* @return the totalCount
|
*/
|
public long getTotalCount() {
|
return this.totalCount;
|
}
|
/**
|
* @param totalCount the totalCount to set
|
*/
|
public void setTotalCount(long totalCount) {
|
this.totalCount = totalCount;
|
}
|
|
@Override
|
public String toString() {
|
return "ResPage [page=" + this.page + ", pageSize=" + this.pageSize
|
+ ", totalPage=" + this.totalPage + ", totalCount=" + this.totalCount
|
+ "]";
|
}
|
|
|
}
|