Home

 

Model

The model for the RedBank project is implemented using a simple Java project, exposed to other components through a facade interface (called ITSOBank). The main ITSOBank object is a singleton object, accessible by a single static public method called getBank.

The ITSOBank object is composed of the other business objects which make up the application, including Customer, Account, and Transaction. The facade into the bank object includes methods such as getCustomer, getAccounts, and withdraw, deport, and transfer. Figure | 3-8 shows a simplified UML class diagram of the model. The model is described in detail in Chapter | , Developing Java applications.

Figure 13-8 Class diagram for RedBank model

The underlying technology to store data used by the ITSOBank application involves Java HashMaps. These are populated at startup in the constructor, and obviously the data is lost every time the application is restarted. In a real world example, the data would be stored in a database, but for the purposes of this example, HashMaps are fine. In Chapter | 4, Developing EJB applications, the ITSOBank model is modified to run as EJBs and JPA entities, and the application data is stored in a database.

ibm.com/redbooks