Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
4.6.5 CustomerManager.java The CustomerManager class acts as a facade for the model and implements the singleton pattern. It has all the business logic methods dealing with customers. For the sample, this class directly implements the business logic methods, but in more complex applications (for example, applications with database access) this class would call other classes to perform the work. The source code for this class is shown in Figure 4-21. Example 4-21 CustomerManager.java package com.ibm.itso.wedappdev.jsfwebapplication.model; import import import import import java.util.Arrays; java.util.Collection; java.util.HashMap; java.util.List; java.util.Map; /** * Manager (facade) for business methods relating to customers. * */ public class CustomerManager {