Data Access Layer
The data access layer manages the persistence of the domain model objects.
Five interfaces -
provide operations as defined by Spring's JPetstore sample application.
The implementation of the case study introduces an additional inteface,
, that contains create/read/update/delete (CRUD) operations.
, a generic class, is extended by each of the other
interfaces, and enables type-safe operations for each subclass.
The data access layer of the case study is implemented using Hibernate
as the object-relational mapping framework.
The design separates general behavior (
from Hibernate-specific behavior (the rest of the classes).
implements the CRUD operations and
method, and introduces several abstract
methods to be implemented by framework-specific classes.
of these abstract methods suitable for an implementation
using Hibernate with Spring.
The type-specific DAOs (e.g.
implement methods particular to the corresponding interface
) as well as abstract methods
left unimplemented by