Multiplicity in Bean Classes

Here’s how it works with our bean code. This multiplicity notation is the only UML-like thing you have to know on the exam.

image with no caption

To read this, you have to follow the arrow to its destination. In the Person to Pets relationship, Person has a multiplicity of ONE, but Pets has a multiplicity of MANY (which could be zero). To find out how many Pets a Person can have, you have to follow the arrow out of Person and into Pets. The number closest to the class is the multiplicity of that class to others. In other words, how many of that type does the other type have.

image with no caption

Get Head First EJB now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.