Chapter 4. Querying a Database
In this chapter, we will cover the following recipes:
- Connecting to a database
- Creating a DAO class
- Calling a DAO method from a controller class
- Saving an object
- Retrieving an object
- Retrieving a list of objects
- Retrieving a list of objects with their dependencies
- Updating an object
- Deleting an object
- Finding the number of results for an SQL query
- Saving a list of objects at once
- Reverting incomplete database modifications using transactions
- Using Hibernate for powerful object persistence and querying