LineageNodeTypeDAO { public Integer totalRecordCount() { Session session = sessionFactory.openSession(); session.beginTransaction(); Criteria criteria = session.createCriteria(LineageNodeType.class); Integer size = criteria.list().size(); session.getTransaction().commit(); session.close(); return size; }  List<LineageNodeType> list(Integer pageNum, Integer numResults); Integer totalRecordCount(); LineageNodeType get(int id); int insert(LineageNodeType lineageNodeType); void update(LineageNodeType lineageNodeType); void delete(int id);  }
@Ignore @Test public void testTotalRecordCount() throws Exception { LOGGER.info("Size of LineageNodeType is:" + lineageNodeTypeDAO.totalRecordCount()); }