Author Topic: Persistent Classes  (Read 6559 times)

zyx

  • EA User
  • **
  • Posts: 95
  • Karma: +1/-1
    • View Profile
Persistent Classes
« on: December 30, 2016, 01:52:41 am »
Hello,

    There is a way to show a class is a persistent class? I mean graphically, I know that in the class properties I can set it is persistent.


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Persistent Classes
« Reply #1 on: December 30, 2016, 02:31:48 am »
Where in the class properties can you set persistence?

q.

zyx

  • EA User
  • **
  • Posts: 95
  • Karma: +1/-1
    • View Profile
Re: Persistent Classes
« Reply #2 on: December 30, 2016, 04:30:15 am »
Well, I click in the class, then in details, there is a combo entitled persistence where you can set your class to be persistent or transient.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Persistent Classes
« Reply #3 on: December 30, 2016, 04:52:18 am »
Uhh, that was too obvious... I guess that except for writing a shape script there is no standard way. Instead you could consider to use a <<persistent>> stereotype instead of this property. This property is most likely some UML heritage. The recent 2.5 spec does not tell anything about such a property.

q.

zyx

  • EA User
  • **
  • Posts: 95
  • Karma: +1/-1
    • View Profile
Re: Persistent Classes
« Reply #4 on: December 30, 2016, 05:03:05 am »
Well, I thought about it, but there is no such stereotype available, so I must to create a new one, correct? I know EA allows you to digit a stereotype that is not in the list, but is it correct? I read that to create new stereotypes we need to create a new UML profile... Or is there a profile with this kind of stereotypes? I think it is very probable...

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Persistent Classes
« Reply #5 on: December 30, 2016, 05:07:01 am »
You can create any stereotype at wish (as you do with class names). That is their intention. Using them with MDG is a more strict way to prevent people to go astray and add stereotypes in dozens. EA security also has an option to restrict adding stereotypes for single users/groups. If that is not enabled, your users can already introduce stereotypes (also by accidentally misspelling them).

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: Persistent Classes
« Reply #6 on: December 30, 2016, 08:34:25 am »
I know EA allows you to digit a stereotype that is not in the list, but is it correct? I read that to create new stereotypes we need to create a new UML profile...

From a strict UML point of view, all stereotypes come from profiles and all tagged values come from stereotypes. EA is more flexible, but these free stereotypes can be considered as part of an implicitly defined profile.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Persistent Classes
« Reply #7 on: December 30, 2016, 09:33:43 am »
I never thought about that. Actually p. 278 of UML 2.5 states
Quote
A stereotype must be contained, directly or indirectly, in a profile.
I concur with Simon's statement that EA provides this implicit (dynamic) profile. Especially when reading p. 251 where they write
Quote
There is no simple answer for when to create a new metamodel, when to create a new profile, and when to create both
which qualifies the earlier statement
Quote
when defining a UML profile, the profile’s stereotypes are defined to extend the UML classes in the normative version of the UML

q.