• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

JPA Composite Entities in Sequence Diagrams

 
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am working on a composite object which have 2 sub levels underneath. I mean for example, Customer-CustomerAccount-CustomeAccountDetail.
I'd like to add additional CustomerAccountDetails to the Customer.

How can I show this in a sequence diagram?

In Cade's 2nd edition book, all the examples are for the first level objects where he just new()s the objec and persist. Does this represantation also work for composites?


I appreciate your help

Regards,
Murat
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
A sequence diagram is not the main diagram type to show static relations between classes.
Instead it shows interactions between objects in a chain of events triggered by some certain action or invocation.
If you, in a sequence diagram, want to show that invoking method foo() on a Customer object will trigger the invocation of the method bar() on CustomerAccount and the method fooBar() on CustomerAccountDetail, then you draw two lines from the "bar" being the result of foo() being invoked on a Customer object.
The first line goes to a CustomerAccount object and the second to the CustomerAccountDetail object, with the labels on the lines being bar() and fooBar().

With that said, one can question the gain of showing this amount of detail in a sequence diagram.
Are you showing something that is difficult to understand if you had not showed it?
Can you still understand the principles of the operation you want to describe if you omit the detail information?
Best wishes!
 
His brain is the size of a cherry pit! About the size of this ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic