Multiplicity affects return type!
A Movie has one Director. When you call getDirector(), you get back one Director. So the return type of getDirector() is a Director().
But a Director has many movies, so when you call getMovies(), you get back a Collection of Movies.

Movie has a multiplicity of “many” in its relationship with Director. That does NOT mean that Movie has “many” Directors... it means that Director has “many” Movies!
So Director has a getMovies() that returns a Collection of Movies.
And Director has a multiplicity of “one”, which means that Movie will return just one Director.
In the Movie-to-Director relationship, the multiplicity of Movie is many and the multiplicity of Director is one.
A multiplicity of one means the object you’re related to holds just one of you.
Director has a multiplicity of one, so the Movie object related to Director returns just a single Director bean (OK, technically the component interface of Director, but you know what we mean by now).
A multiplicity of many means the object you’re related to holds a Collection of you.
Movie has a multiplicity of many, so the Director object related to Movie returns a Collection of Movie beans.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access