Chapter 15. Criteria Queries
Hibernate features an intuitive, extensible criteria query API.
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();