criteria分页 public Page getPage(int currentPage,int pageSize,Criterion...crts){ Criteria c=session.createCriteria(House.class); List list=null; for (int i = 0; i < crts.length; i++) { c.add(crts[i]); } c.setProjection(Projections.rowCount()); int totalRecord=Integer.valueOf(c.uniqueResult().toString()); c.setProjection(null);