Business Logic Layer
The business logic layer provides the API for manipulating, persisting and retrieving the domain model objects of the application.
It also provides transactional boundaries for all operations.
PetStoreFacade
and
OrderService
are interfaces that define the operations;
PetStoreImpl
implements both of these.
PetStoreImpl
delegates to
Dao
classes in the data access layer
in order to update and retrieve objects from the persistent store.
In this sample application there is hardly any real business logic, since
most operations merely delegate directly to the data access layer.
The
insertOrder
method is the single exception.
It interacts first with the
OrderDao to insert an order, then calls the
ItemDao
to update the quantity.
The case study introduces the
AdministrationService
interface and its implementation,
AdministrationServiceImpl
,
which are not part of the original JPetStore sample application.
These provide operations supporting creation and deletion of all types of domain objects,
a capability that is used for integration tests that involve transactions.