If we do not have any idea about the identifiers of the objects and then we need to looking for, so then we need a query. Hibernate supports an easy-to-use but powerful object oriented query language (HQL)
. For programmatic query creation, Hibernate supports a sophisticated Criteria and Example query feature (QBC and QBE)
. By the help of this we can also express your query in the native SQL
of your database, with optional support from Hibernate for result set conversion into objects.