封装后的分页,把当前页面,当前页面显示记录数,做成参数让调用者使用。
调用分页的方法
List<Employer> list=employerServiceInter.showEmpList(1,3);
分页方法
public List<Employer> showEmpList(int nowPage,int pageSize) {
// TODO Auto-generated method stub
String hql="from Employer order by id desc";
List<Employer> list=executeQueryByPage(hql, null, nowPage, pageSize);
return list;
}