日期:2014-05-17 浏览次数:20708 次
hql="from Port p1,DangerousArrivalDeclare d,Port p2 where p1.portID=d.startingPort and p2.portID=d.arrivalPort order by d.reviewResult ";
firstPage=1;
maxPage=10;
Session session = this.getHibernateTemplate().getSessionFactory().openSession();
Query query = session.createQuery(hql);
query.setFirstResult(firstPage);
query.setMaxResults(maxPage);
ArrayList list=(ArrayList) query.list();
Iterator iterator1 = list.iterator();
System.out.println("size="+list.size());