The Domain Mapper layer provides the application's business logic or semantic processing. It is where the real work of an application is done, whereas most other layers have a generic function, such as providing a transaction context (i.e., Session EJBs) or mapping between Java objects and database tables (i.e., Entity EJBs).
The Domain Mapper layer resides between the EJB Session and the EJB Entity layers. It is implemented using conventional Java classes and, hence, can be generalized using inheritance, abstract methods, and EJB superclasses for generic references to the EJB Entity layer.
Domain Mapper Interfaces
Two interfaces are shown: IMapperOOC and IMapperSet. The first shows the signatures for the five CRUDS methods for this layer -- -- add, delete, update, get, and search. The second interface includes two methods that extend the generic OOC methods. These include a getSetMembers and a move method.
Mapper OOC
MapperOOC is the superclass that all Domain Mapper subclasses extend. It includes the five core CRUDS methods. Abstract methods define all the type-specific resources required for actual run-time processing.
Mapper Set
MapperSet is a subclass that extends MapperOOC and implements the IMapperSet interface. It provides two main sets of methods: those that provide additional function to the CRUDS methods of the OOC superclass and those that implement the abstract methods defined as part of the OOC superclass. The latter, of course, provide all of the type-specific function required for the subclass and for run-time processing by the superclass.