Criteria crit = s.createCriteria(RegForm.class);
List list = crit.list();
The first line creates a criterion for the mapped class RegForm. The second line runs a query based on this criterion. In the background Hibernate maops from this class to a database table using a dialect and constructs the appropriate SQL to query against the database. See the documentation for more.