Chapter 6. DAOs and Querying

If the domain model serves as the persistence tier's foundation, then the DAO layer might be considered the engine. As you've learned in previous chapters, the DAO pattern is intended to abstract lower-level persistence functionality, including creating, reading, updating, and deleting entities. But a DAO typically provides more than basic CRUD functionality.

Specialized queries that reflect the core entity-access capability of an application are usually baked into a DAO layer. For example, since our gallery application requires that end users be able to view a series of images within a particular category, the ability to query and load the relevant ArtEntity domain objects by a specified Category should be provided ...

Get Spring Persistence with Hibernate now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.