Given that Java applications need to persist data in the database, there are different approaches to achieve this objective, including using JDBC APIs or an Object/Relational Mapping (ORM) framework. An ORM framework greatly simplifies the process of storing and retrieving the data from the database by means of mapping the Java objects with the data stored in the database. Some of the popular ORM frameworks are Hibernate and MyBatis. In this chapter, you will learn about Hibernate and its concepts in relation with how Hibernate can be used with Spring apps to interact with the databases. We will cover the following topics in this chapter:
- An introduction to Hibernate
- Setting up Hibernate with Spring
- Designing domain objects and database tables
- An introduction to NamedQuery and Criteria
- Common Hibernate operations...