You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
package com.ischoolbar.programmer.page.admin;
|
|
|
|
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
|
|
|
|
@Component
|
|
|
|
public class Page {
|
|
|
|
private int page = 1;
|
|
|
|
|
|
|
|
private int rows;
|
|
|
|
|
|
|
|
private int offset;
|
|
|
|
|
|
|
|
public int getPage() {
|
|
|
|
return page;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setPage(int page) {
|
|
|
|
this.page = page;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getRows() {
|
|
|
|
return rows;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setRows(int rows) {
|
|
|
|
this.rows = rows;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getOffset() {
|
|
|
|
this.offset = (page - 1) * rows;
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setOffset(int offset) {
|
|
|
|
this.offset = offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|