StatisticsDBDao { public List<Statisticsdb> list(Integer pageNum, Integer numResults) { Session session = sessionFactory.getCurrentSession(); session.beginTransaction(); Criteria criteria=session.createCriteria(Statisticsdb.class); criteria.setFirstResult(pageNum); criteria.setMaxResults(numResults); List<Statisticsdb> statisticsdbs = criteria.list(); session.getTransaction().commit(); return statisticsdbs; }  List<Statisticsdb> list(Integer pageNum, Integer numResults); Long totalRecordCount(); Statisticsdb get(Integer id); Integer insert(Statisticsdb statisticsdb); void update(Statisticsdb statisticsdb); void delete(Integer id);  }
@Ignore @Test public void testList() throws Exception { List<Statisticsdb> statisticsdbLists = statisticsDBDao.list(0,2); for (Statisticsdb statisticsdblist: statisticsdbLists) { LOGGER.info("******"+statisticsdblist.getUniqid()); } }