tags:

views:

267

answers:

4

alt text

+4  A: 

This is a class diagram, with added stereotypes

Midhat
what's an added stereotype?
omgzor
Stereotypes are special types of classes. They are used to model business concepts. for example, a web page is a special concept in a web application. it will be modelled as a class but with an added stereotype that its a webpage. Now the stereotype can contain more data like page encoding, for example. read up on the wikipedia or omg pages for stereotypes
Midhat
A: 

This class diagram is not correct because there is a confusion between jee stereotypes and class names !! What is << class module>> , << module>> stereotypes and Session, session persistence names should be jee stereotypes. If it persists in the database then it is an entity!! Persistence etc...can be written on attributes. this diagram is a non sense !!

The below diagram is correct and how should be used persistence in a class diagram: http://www.forum-omondo.com/documentation_eclipseuml_2008/Eclipse_Database/Reverse_Existing_Database/class_diagram_created.png

The main advantages is that if you use then a code generator such as AndroMDA, MIA software, Blue Age etc...you can then generate your database directly from the model because thess tools look at stereotypes during this code generation stage. If you don't want to generate code from model but prefer to let hibernate mapping do the job then the "entity" stereotype is also written as an annotation in your java code because of live code and model synchronization therefore hibernate can take annotation and produce mapping. This is why the stereotype is really very important and using wrong stereotype is a very serious mistake !

A: 

What is the emphasis or goal of this diagram? If it's the classes and relationships, then it's a class diagram. If it's the mapping between the classes and layers of function or responsiblity in the system, then it looks like a layer diagram. Those columns look like layers: presentation, business logic, data...

Esther Fan - MSFT
A: 

Ok now I see the problem after a good sleep :-)

It seems it is a powerpoint and not a class diagram because you can not have straight line in a class diagram. I mean you can not have 3 separators like Presentation/ objectos .......etc

This powerpoint tried to use class diagram and have added titles in order to separate 3 layers. The problem is that the class diagram is incorrect and it is not because you present it with 3 layer that it would become correct !! This is a bad understanding of what means JPA stereotypes inside a class diagram.