2012年9月28日

Hibernate实现分页查询

摘要: 分页查询是Web项目经典应用,下面是实现Hibernate分页查询的具体实现。关键点是使用了Query的两个重要的函数,SetFirstResult(int firstResult)用于设置从哪一个对象开始检索,SetMaxResult(int maxResult)用于设置每次检索返回的最大对象数。public class Test { public static void main(String[] args) { SessionFactory sf=new Configuration().configure().buildSessionFactory(); ... 阅读全文

posted @ 2012-09-28 23:51 ELVIS9090 阅读(294) 评论(2) 推荐(0)

导航