package org.mgq.action;
import java.util.List;
import org.mgq.dao.StudentImpl;
import org.mgq.model.Student;
import com.opensymphony.xwork2.ActionSupport;
public class StudentAction extends ActionSupport{
private List<Student> students;
private int pageNow=1;//��ʼ��Ϊ1,Ĭ�ϴӵ�һҳ��ʼ��ʾ
private int pageSize=5;//ÿҳ��ʾ5����¼
private Student student;
private int count;
private int page;
private StudentImpl studentImpl=new StudentImpl();
public String queryByPage()throws Exception{
students=studentImpl.queryByPage(pageSize, pageNow);
return SUCCESS;
}
public String query(){
student=studentImpl.query(count, page);
return SUCCESS;
}
public Student getStudent() {
return student;
}
public void setStudent(Student student) {
this.student = student;
}
public int getCount() {
return count;
}
public void setCount(int count) {
this.count = count;
}
public int getPage() {
return page;
}
public void setPage(int page) {
this.page = page;
}
public List<Student> getStudents() {
return students;
}
public void setStudents(List<Student> students) {
this.students = students;
}
public int getPageNow() {
return pageNow;
}
public void setPageNow(int pageNow) {
this.pageNow = pageNow;
}
public int getPageSize() {
return pageSize;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
}