WebUrlsDBDao { public List<Weburlsdb> list(Integer pageNum, Integer numResults) { Session session = sessionFactory.getCurrentSession(); session.beginTransaction(); Criteria criteria=session.createCriteria(Weburlsdb.class); criteria.setFirstResult(pageNum); criteria.setMaxResults(numResults); List<Weburlsdb> weburlsdbs = criteria.list(); session.getTransaction().commit(); return weburlsdbs; }  List<Weburlsdb> list(Integer pageNum, Integer numResults); Long totalRecordCount(); Weburlsdb get(Integer id); Integer insert(Weburlsdb weburlsdb); void update(Weburlsdb weburlsdb); void delete(Integer id);  }
@Ignore @Test public void testList() throws Exception { List<Weburlsdb> weburlsdbLists = webUrlsDBDao.list(0,2); for (Weburlsdb weburlsdbList: weburlsdbLists){ LOGGER.info(weburlsdbList.getUrl()); } }