5. Reading Objects

To read data from our database inside our transaction block, we create a query. Then, we store these items into a Java List collection, which will hold an in-memory copy of the information from the persistent storage.

The persistence manager gives us an access to the query interface that allows us to interact with the database: