Red Hat Training

A Red Hat training course is available for Red Hat JBoss Web Server

Chapter 15. Criteria Queries

15.1. Creating a Criteria Instance

The interface org.hibernate.Criteria represents a query against a particular persistent class. The Session is a factory for Criteria instances.
Criteria crit = sess.createCriteria(Cat.class);
crit.setMaxResults(50);
List cats = crit.list();