http://www.iteye.com/topic/87035
- @Override
- public List<Employee> listAll(int start, int step) {
- // Session s = this.getHibernateTemplate().getSessionFactory().getCurrentSession();
- Session s = this.getHibernateTemplate().getSessionFactory().openSession ();
- // System.out.println(s);
- Query q =s.createQuery("from Employee");
- q.setFirstResult(start);
- q.setMaxResults(step);
- List l = q.list();
- if(l != null)
- return l;
- else
- return null;
- }