UML notation in Class diagram

Hello,
I'd like to model a realationship between, for instance, Customer and
Profile entities in my Class diagram. And I'd like to include class
attributes to communicate better my design. I intend to implement
both entities as Entity EJB. Which of the following options is
correct for presenting a relationship between Customer and Profile in
UML Class diagram:
1) via Customer.profile and Profile.customer
| Customer | | Profile |
|id:long |---------|id:long |
|profile:Profile|1 1|customer:Customer|
--------------- |firstName:String |
|lastName:String |
|DOB:Date |
|address:String |
2) or via Customer.profile_id and Profile.customer_id
| Customer | | Profile |
|id:long |---------|id:long |
|profile_id:long|1 1|customer_id:long |
--------------- |firstName:String |
|lastName:String |
|DOB:Date |
|address:String |
In my database I would implement the relationship using id:long
fields. But with UML diagram presentation I'm not sure because I've
seen different appearences.
Appreciate your help.

[UML] however fails miserably with complex class
diagrams...Of course I have seen huge class diagrams that where really terrible, because people mixed stuff that doesn't belong together. But I never noticed, that UML itself would be the problem. Do you have an example that couldn't conveied apropriate using UML ... and if possible a better way to get the idea across?
regards
Spieler

Similar Messages

  • UML modeling for class diagrams, could not generate code for modified diagr

    Hi,
    I'm using Java studio Enterprise for creating class diagrams and generating code from the UML using round trip engineering. I'm able to create class diagrams and generate code from the diagram. I tried modifying java code for classes and saved it. Now if I try and modify the diagram its not updating the java code associated with it.
    Please suggest the workaround or so.
    Thanks
    Sunita

    Maybe the linkage between the source and model class element is broken. Try to expand the class element from the project tree to see if a source file artifact node (under the class that displays the pathname as the name of the node). If not, that's why. Then, the workaround is to manually add the pathname to the java source file. Here are the steps:
    - expand the class in question
    - select the source file artifact node
    - from the properties window on the right side of the ide, enter the exact pathname to the java source file and press the Enter
    It should work now.

  • UML TOOL FOR CLASS DIAGRAMS??

    Hi,
    Can anyone tell me if there is an free tool which can draw the class diagrams if i give the root
    of my source directory or some package?
    Thanks

    try argouml
    http://freshmeat.net/projects/argouml/
    It's not particularly advanced but should handle what you want.
    matfud

  • I can not drag java class onto uml class diagram - why??

    Hi
    1. I created a new java web project
    2. I created a new uml project.
    3. I created new classes in the java web project.
    4. I created a new "class diagram" in the uml project.
    PROBLEM:
    1. When I drag one of the classes onto the class diagram screen, nothing happens. That is, when I perform the "drop"...nothing happens.
    (NOTE: when I drag a "package" to the class diagram, a box representing the java package appears... I just cant get this to work for a class(s) )
    QUESTION:
    Should I be able to drag a class (or classes) from my web project src folder onto the UML project's class diagram and have UML representations of the classes appear?

    Hi Shay
    Unfortunately, I cannot view the suggested youtube stuff at work. (I'll try to view it when I get home)
    But, in the meantime, I did kind of get things working...
    After creating the java project and uml project (and initial class diagram), I had to
    1. drag the java packages (containing the classes I wanted diagrammed) onto the root node of the UML project (i.e., located on the left side "navigation" bar). Afterward, the package appeared under the UML project....Then,
    2. One by one I had to drag the individual java classes from the java project onto the root node of the UML project (i.e,. the classes then appeared under their respective packages under the UML project) . Then,
    3. Then, finally, I could drag the java classes (listed under their respective packages under the UML project) onto the class diagram panel, where the rendered properly.
    I dont know if this is supposed to be the way to "reverse engineer" java classes to be part of a UML class diagram... But, it was the only way I found that worked... thus far, anyway.
    Thanks again for reading my post and answering so promptly.... That was much appreciated!
    s

  • UML notation: Class operation return value multiplicity

    Hallo,
    how would you write function from example below using UML notation on implementation level, please:
    class Coin {
      public String[] getSideNames() {
        return new String{ "Odd", "Even" };
    }Multiplicity in return value is troubling me. I've tried +getSideNames( ) : String [ 2 ] but my tool just created new class named "String[2]" :-( To be precise I know that return value of function is array of MyClass with one or more element (1..*) so created class name was "MyClass[1..*]" -- nasty name to pass to javac isn't it? :-)
    Is is possible to write multiplicity of return value this way? I couldn't find anything in omg's "UML: supertructure document" :-( I am not telling that it's not written there :-)))
    Thank You.

    jschell>
    Unfortunately [n] behaves in same fashion as [*] =>
    creating class named MyClass[1..n]" :-(
    duffymo> what's the point?
    this was only sample, real application is far more
    complex than that. Even "nature" of result was just
    made up. How am I or anyone else who responds supposed to know that?
    >
    duffymo> you can have cardinality in a class diagram
    that shows exactly two values are available.
    yup, i ended like that but there's still problem coz
    return value class is "Object[]" :-(Sounds like a bad design, but I haven't seen the code, so I can't tell.
    duffymo> personally, i don't think that exposing the
    side names as ...
    "side names" were just example :-) IMHO there are
    certain situations where one could say "screw the
    abstraction" :-D E.g. for final classes from one
    package that cooperate on single time critical task.
    :)"screw the abstraction" - good luck as an object-oriented designer with that attitude.
    Either you're doing real-time work where time really is critical, or you're just another yutz who is congratulating himself on recognizing a time critical task without doing profiling or getting any real data. (A common mistake.) The maintainence and development time might be more critical here.
    Gotta admit that I'm not much interested in commenting on your poor approximation of the real problem.
    %

  • Hungarian Naming Contentions for UML Class Diagram

    UML class diagram should be generic for all the available object oriented language and should not be language dependent. If we follow pure java naming conventions in UML class diagram, which make the UML class diagram Java language dependent not generic.
    I am trying to combine Hungarian Naming Contentions with Java Naming Convention so variable name will follow x_y schema where x_ is according to Hungarian notation attached with class attribute, which is named according to java naming standard. This naming standard satisfies UML naming convention and will also help in java programming.
    For an example,
    i_userNumber Here 'i_' is a Hungarian notation representing type of variable attached with class attribute . This indicates that the attribute is an interger , which is named according to java naming standard.
    Feedback Please

    You're going to get a gozillion answers to this question, and all of them will be both right and wrong to some degree, so I will give you my thoroughly opinionated answer to go along with all the rest.
    I am not a fan of Hungarian notation for one fairly fundamental reason. Java is a strongly typed language, thus it doesn't need indicators of type. By putting a type indicator on a variable you create potential problems when you change a data type. Won't happen? I am currently sweeping through a major portion of the application I'm working on changing data types for masses of variables because the database guys took a whim to change the data type in the database. If I were using Hungarian notation, not only would I have to change the type, the parameter type and return type for the accessor mutator methods, I'd also have to change the name, the name of the accessor and mutator methods, and anywhere that the variable is modified directly.
    The name of a thing should speak for its self. It shouldn't need an indicator flag on the front to tell me what it is.
    But you're talking about UML not Java code. The same thoughts apply. The name should speak for the thing it represents without the need for additional clarification.
    Hungarian notation in my not so humble opinion adds complexity by requiring the development team to spend effort learning, understanding, thinking about, processing, manipulating, touching, dealing with what is essentially a thoroughly artificial naming scheme.
    Just my thoughts on the subject. Your milage may of course vary wildly.

  • O/T: UML Class Diagrams

    This is slightly off-topic from the specific nature of this section but here goes.
    I am trying to create class diagrams and just wanted to check that i am getting it right. Please see my example code below:
    class an_example {
      int a_variable = 0;
      public void a_method() {
         int b = 0;
         int c = 1;
    }So the uml diagram would have a big box with "an_example" heading it. In the attributes you would have just one: a_variable: int = 0; I think it would be private, as it is not preceeded by a public attribute - right?
    then you would have the method a_method(): void.
    The variables in my method would not be included in the uml diagram as they are irrelevent. Is this correct?

    a_variable is not private in your code--it is "package" access. I don't think UML has a specific notation for that, but I could be wrong.

  • Extending the UML class diagrams with JDeveloper Extensions SDK?

    Hello,
    I studied the JDeveloper Extension SDK docs, but couldn't figure out how to write extensions that support UML Diagrams.
    What I would like to do, is to pin a different data model under the class diagram view.
    Well if you can't do that. In the worst case, my extension would register with a regular class diagram and listen to its events and and refuse particular changes. It would also create or use an empty class diagram and fill in the classes and associations in it. (this is less clean but I could live with it).
    Thanks in advance for all your suggestions.
    Slawek

    By definition you can change classes through the model so I guess the problem here is that the model cannot apply updates to something that it is pointing to the the compiled version of.

  • Jato 1.2 UML Class Diagrams

    Hi All,
    I have put together some UML class diagrams for JATO 1.2. You may find them
    useful. Please let me know if you spot any errors.
    Regards,
    Dennis Parrott.
    Dennis Parrott
    Senior Consultant
    iPlanet Professional Services
    Sun Microsystems Limited
    Guillemont Park
    Camberley Mobile: +44 (0)7765 221938
    GU17 9QG Email : dparrott@i...
    iPlanet
    e-commerce solutions
    www.iplanet.com
    [Non-text portions of this message have been removed]

    Hi Dennis--
    Only we can post files for the group. We'll be happy to do so, or if you
    would rather host a public site for them, we can post a link in the group.
    (Looking forward to seeing the diagrams.)
    Todd
    ----- Original Message -----
    From: "Dennis Parrott" <dparrott@i...>
    Sent: Monday, December 17, 2001 7:41 AM
    Subject: RE: [iPlanet-JATO] Jato 1.2 UML Class Diagrams
    Note the deliberate mistake - the document was not included - actually it
    was removed - How can I publish this to the group?
    Dennis Parrott[PARA]Senior Consultant[PARA]iPlanet Professional
    Services[PARA]Sun Microsystems Limited[NL]Guillemont Park[NL]Camberley
    Mobile: +44 (0)7765 221938[NL]GU17 9QG Email :
    dparrott@i... iPlanet [PARA]e-commerce solutions
    [PARA]www.iplanet.com
    -----Original Message-----
    From: Dennis Parrott [mailto:<a href="/group/SunONE-JATO/post?protectID=114154113180127190050057203026021130134026057192209171188199">dparrott@i...</a>]
    Sent: 17 December 2001 15:35
    Subject: [iPlanet-JATO] Jato 1.2 UML Class Diagrams
    Hi All,
    I have put together some UML class diagrams for JATO 1.2. You may findthem
    useful. Please let me know if you spot any errors.
    Regards,
    Dennis Parrott.
    Dennis Parrott
    Senior Consultant
    iPlanet Professional Services
    Sun Microsystems Limited
    Guillemont Park
    Camberley Mobile: +44 (0)7765 221938
    GU17 9QG Email : dparrott@i...
    iPlanet
    e-commerce solutions
    www.iplanet.com
    [Non-text portions of this message have been removed]
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    Choose from 1000s of job listings!
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp

  • JDev TP3 / UML Class Diagram / How can I specify a derivative attribute?

    Hello,
    I'm trying to put derivatives (or calculated) attributes such as "age" or "price" in a class of UML diagram. In all of UML books that I've seen, a derivative attribute is represented with a "/" and the attribute's name. For example, "/age" or "/price". But in the class diagram of JDeveloper I can't put "/" in the name of attribute. So, how can I specify a derivative attribute?
    Thanks in advance,
    JVN

    Unfortunately, it is not possible to denote derived attributes in TP3. Bug 6915067 has been logged to address this in a future version.
    Thanks, Guus (JDev PM)

  • .java - UML Class Diagram

    Hello for my university exam, i developed an application, now i need to print the UML class diagram, so I was searching around for a tool to create the class diagram for my source code.
    I had tryed the software "borland together trial edition" for eclipse IDE, but i've two problems..
    1) it creates UML class diagram just for a package without expanding subpackages..
    2) it doesn't give an easy way to export the created UML class diagram, the only "good" format for printing it can export is a "buggy" SVG...
    Do you know better (and maybe free) software to create the UML class diagram from my sources? (or maybe you know a way to solve the two problem i said?
    thank yoU!!!

    There's a package on sourceforge call JReFactory which might do the job.

  • Creating class diagrams with the Endevo UML Modeller

    I need to create a UML class diagram from existing LabVIEW 2009 projects and classes.  Has anyone had any experience using the Endevo UML Modeller 1.2 to do this?  The web site does not have an evaluation version of the UML Modeller.

    Try cross-posting (mention the cros post) on the LAVA OOP forum here.
    The develpers from Endvo watch that fourm and reply regularly to GOOP questions.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • UML Class diagrams: Printing and formatting

    I really like the UML capabilities of NetBeans 5.5. In particular, I like the ability to create a "centered" dependency class diagram by right-clicking on a class and selecting "Generate Dependency Diagram."
    However, I am having trouble with some basic printing and formatting issues. I am hoping that I'm just being stupid, but I haven't been able to find documentation on how to fix this. I am using Red Hat Enterprise (3.4.6-3).
    I recently reverse engineered an 800 class project, and it didn't take too long. Less than a minute, probably.
    1. Can't get a landscape printout. Fiddle with Page Setup and Print menu items, set to landscape, but almost always get a portrait mode printout. Why?
    2. The arrowheads are frightfully small. How do you make them bigger?
    3. How can you globally set a preference to only show public attributes and operations for all classes?
    Thanks for the help.
    Dave Godbey

    Good to hear your feedback. Thanks.
    #1. there's a known bug on printing to landscape mode. However, the following workaround should print you a landscape diagram.
    - from the diagram window toolbar, click on the Print Preview button
    - from the Print Preview dialog, click on Print Setup
    - from the Print Setup dialog, click on Page Setup at the bottom left
    - from the Page Setup dialog, toggle the Landscape orientation radio button
    - press the OK button on the Page Setup and Print Setup dialogs: Your print preview should now be displayed in landscape orientation
    - now click on the Print button from the Print Preview dialog to print
    #2. I believe your diagram must be big so that the arrowheads are displayed small. Currently I don't see a way to make them bigger. Sorry for the inconvenience. I can file an enhancement on this for you or you can file one for yourself too thru the following URL.
    http://uml.netbeans.org/issues/enter_bug.cgi?component=uml
    #3. As for global preference to show only specific attributes or operations, there's an enhancement bug already, but the current version of the tool doesn't have this preference setting.

  • JBuilder and UML Class Diagrams?

    What version of JBuilder allows you to generate UML Class Diagrams from the Java code? I was thinking of downloading the free personal edition of JBuilder, but I'm not sure whether this functionality is included.

    What version of JBuilder allows you to generate UML
    Class Diagrams from the Java code? I was thinking of
    downloading the free personal edition of JBuilder, but
    I'm not sure whether this functionality is included.You need the enterprise version of JBuilder to get the UML diagram function.

  • UML Sequence diagram and class diagram

    Making UML sequence diagram I didn't put activation rectangle in first object(UI) assuming that this object is always active. Is this correct? Not according to my tutor and I have to quote him:
    "Finally, you have no activation rectangle for the userInterface instance, so the initial message could never have been sent."
    Another thing he is picking me at is and I'm quoting him:
    "In class diagram the generalisation arrow heads should be open triangles."
    In my opinion there isn't strictly said that they must be open triangles especially when software lets you choose their form. Looking forward to hear your opinions.
    Thanks for answers.

    atch7 wrote:
    Making UML sequence diagram I didn't put activation rectangle in first object(UI) assuming that this object is always active. Is this correct? Not according to my tutor and I have to quote him:
    "Finally, you have no activation rectangle for the userInterface instance, so the initial message could never have been sent."
    Another thing he is picking me at is and I'm quoting him:
    "In class diagram the generalisation arrow heads should be open triangles."
    In my opinion there isn't strictly said that they must be open triangles especially when software lets you choose their form. Looking forward to hear your opinions.
    My opinion is that in the real world that is meaningless. In the real world you might encounter one or more of the following situations.
    - There is no UML diagrams at all (thus whether one is active or not is moot.)
    - The UML diagrams are very high level and intended merely as a starting point. Missing details does not mean that you are free to ignore that the system must still run when you are done with it.
    - You will use a UML design tool that generates code, and you fill in blocks within it. Then of course details in the UML will matter. The chance that you will actually encounter this situation is almost zero. Realistically the only real place you might encounter this is if your work for a company that produces UML design tools.

Maybe you are looking for

  • Read data from transactional cube in version SEM 6.40

    Hi, In an exit function of the transaction BPS0, I want to read transaction datas in a transactional cube. In version BW 2.1C - SEM 3.0A, I used the function RSDPL_CUBE_DATA_READ. Now the system is in version BW 3.5 - SEM 6.40 and the function just r

  • Reg.  Weblogic 8.1 cluster licence?

    Hi, I have received Weblogic platform 8.1 CD with the 1 year developer licence. Can i create a cluster and test my application in this cluster. Do i need a seperate cluster licence to test my application, to support load balancing and failover?? rgds

  • Work on encrypted XML

    I'm making adjustments to some WinCE application from which i nee to read and work a bit with XML file, that looks as follows: lock .€Î,«Ãô’ô29e=S&£u"§$N„yž®s¿bÕ…ËéÔXåȯ œÍA8âáøV¬ë Ï0UK¨]ªob»ÃRò,©oߣ¡©“‚ÎB¼ÏO%îsÓ(Š Z(«Í‘ù‚aE±ô[ÌÀ»¼dKzzªÐÃËžäòOrÖÎ

  • Activesync - who takes responsibility

    I am frankly livid that devices are being sold that you KNOW, and have known for some time, do not work properly.  Syncing with more than one computer is a common business task--even with just a work machine and a laptop, and these expensive devices

  • My MacBook Pro 10.8.5 internet suddenly running slow

    Within the past week my MacBook Pro internet is slow as ever. I have other computers in the house that are fine using same wireless.