O'Reilly logo

Applied Enterprise JavaBeans™ Technology by Kevin Boone

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

13.6. Example: the BikeModel EJB

13.6.1. Overview

BikeModel is an EJB that represents a particular model of motorcycle. It stores persistent information about the type, engine size, cost, and a general description. The name of the model is the primary key for this EJB.

The Bike EJB models an individual motorcycle of a particular model. In the case study, Bike has only one property: licenceNumber, that is, its license plate number (‘registration number’). In reality, of course, we may need to store more than this.

The relationship between BikeModel and Bike is one-to-many, navigable in the direction BikeModel to Bike (Figure 13.3).

Figure 13.3. BikeModel and Bike, and the relationship between them.

In the design adopted, Bike is a dependent ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required