Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Factory Homes Domain Model Directed Association

 
Dannyf Soon
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

My first question is about the meaning of the arrows in domain model.

I find the association arrows a bit confusing. there're three directed associations in Factory Home:

1. CompletedDesign -> Product
2. CompletedDesign -> Consultation
3. Customer -> CompletedDesign

I understand #1. For #2 & 3, I'm not quit sure what the arrows mean. But I think these arrows must influnce the class diagram design.

Ranchers please share with me your understanding of the arrows in #2 & 3.

Another question is as following:

Generally speaking, for an association like A -> B, I usually design Class A like this:

Public class B {}

Public class A { private B b;} or
Public class A { public void aMethod(B b);}

That means an instance of class A should hold reference to an instance(s) of class B. Am I right?

Ranchers please give comments.

thanks!
 
Krzysztof Koziol
Ranch Hand
Posts: 133
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it shows how you can navigate from one object to another. When there is an arrow in one direction it means you can get reference to this class only from the one site. Therefore having Customer you can access all Completed Designs (but you can not access customer from the Completed Designs object) and etc.

When you model those classes as Entities all you have to do is map them using unidirectional manyToOne. Do you think we should pay attention to such details?

That's my understanding. Correct me if I'm wrong.
 
Dannyf Soon
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Krzysztof Koziol wrote:I think it shows how you can navigate from one object to another. When there is an arrow in one direction it means you can get reference to this class only from the one site. Therefore having Customer you can access all Completed Designs (but you can not access customer from the Completed Designs object) and etc.

When you model those classes as Entities all you have to do is map them using unidirectional manyToOne. Do you think we should pay attention to such details?

That's my understanding. Correct me if I'm wrong.


Hi Krzysztof Koziol, thanks for response.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic