方法传入两个参数
try {
Session session=getSession();
Criteria crt=session.createCriteria("分页要查询的表");
crt.setFirstResult((page-1)*pageSize);
crt.setMaxResults(pageSize);
List results = crt.list();
return results;
} catch (RuntimeException re) {
throw re;
}
try {
Session session=getSession();
Criteria crt=session.createCriteria("分页要查询的表");
crt.setFirstResult((page-1)*pageSize);
crt.setMaxResults(pageSize);
List results = crt.list();
return results;
} catch (RuntimeException re) {
throw re;
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货