LineageRelationDAO { public List<LineageRelation> list(Integer pageNum, Integer numResults) { Session session = sessionFactory.openSession(); session.beginTransaction(); Criteria criteria = session.createCriteria(LineageRelation.class); criteria.setFirstResult(pageNum); criteria.setMaxResults(numResults); List<LineageRelation> lineageRelations = criteria.list(); session.getTransaction().commit(); session.close(); return lineageRelations; }  List<LineageRelation> list(Integer pageNum, Integer numResults); List<LineageRelation> getNodeIdForNode(String nodeid); List<LineageRelation> getNodeIdForNodeWhenTarget(String nodeid); Integer totalRecordCount(); LineageRelation get(String id); String insert(LineageRelation lineageRelation); void update(LineageRelation lineageRelation); void delete(String id);  }
@Ignore @Test public void testList() throws Exception { LOGGER.info("Size of LineageRelation is atleast:" + lineageRelationDAO.list(0, 10).size()); }