Hibernate hql语句怎么搜索排序结果 如 select * from t_table order by number limit 0,2; ???
Query query = this.session.createQuery("from Usersinfo u order by u.userId desc");
query.setFirstResult(startIndex);//起始位置
query.setMaxResults(length);//条数