Develop the Business Service Tier
Explore how to implement the business service tier for one-to-one bi-directional relationships in Java applications. Understand how to use mappers to convert entities and data transfer objects while performing fetch, create, find, edit, and remove operations. This lesson guides you through implementing each service layer operation with a test-driven approach.
We'll cover the following...
Find all records operation
To develop the business service tier, first look at the test for the “fetching all records” operation.
Code the identical method in the business service by retrieving all the records using the data access operation and converting the entity to data transfer objects using the mapper.
Mappers
The business service tier uses data access objects, but the data access tier uses entities. The mapper typically has two ...