Introduction To Hibernate Criteria
In this section, you will learn about the Hibernate criteria and criteria functions. First of all we will read hibernate criteria object.
Criteria: Criteria is an hibernate object that is used for avoiding the native SQL (Structured Query Language)and HQL (Hibernate Query Language). If you don't have idea or experiance with SQL then you can use the hibernate criteria object. Hibernate Criteria object generate the generate the SQL.
With the help of hibernate criteria we can add each and every type of conditions in where clause and joins tables. Hibernate criteria build queries programmatically by adding objects in right order.
Now, We will see the various types of hibernate criteria functions with running examples and how to use the hibernate express selection, restrictions, joins and projections.
Criteria Functions: There are following types of criteria's functions to use for sQL queries.
5. setFirstResult(int firstResult)
6. setMaxResults(int maxResults)