Example & Tutorial understanding programming in easy ways.

What is Hibernate Query By Example?

Query By Example: In Hibernate, retrieving objects from the database is one of the most intresting part of Hibernate.


Hibernate provides the following ways to get objects out of the database:

1. Retrieval by identifier, the most convenient method when the unique identifier values of an objects is known.

2. In the Hibernate Query Language (HQL) is a full object - oriented query language. The java persistence query language (JPA QL) is a standardized subset of the Hibernate Query Language.

3.Hibernate criteria interface, which provides a type-safe and object-oriented way to perform queries without the need for string manipulation. This facility includes the queries based on example objects.

4. Native SQL queries, including stored procedure calls, where Hibernate still takes care of mapping the JDBC result sets to graphs of persistent objects.

Read More →