HCQL stands for Hibernate Criteria Query Language. As we discussed HQL provides a way of manipulating data using objects instead of database tables. Hibernate also provides more object oriented alternative ways of HQL. Hibernate Criteria API provides one of these alternatives. HCQL is mainly used in search operations and works on filtration rules and logical conditions.
The Criteria interface, Restrictions class and Order class provides the methods and functionality to perform HCQL operations. The Criteria interface object can be created by createCriteria() method of Session interface.
Criteria cr = session.createCriteria(persistantClassName.class);
Hibernate Criteria Query Language tutorial:
- Hibernate Criteria Query Language (HCQL) with example.
- Hibernate criteria basic query example.
- Hibernate criteria restrictions query example.
- Hibernate criteria ordering query example.
- Hibernate criteria pagination query example.
- Hibernate criteria projections query example.