Page History
Otp |
---|
Primary Key and Search Key Attributes
While primary keys are used to identify and address a specific unique object, search keys are used to query for a list of objects. If you want to query for a list using primary key fields, these fields also require setting the <<SearchKey>> stereotype.
Only attributes of primitive types can be marked as primary or search key.
...
Figure: A Persistent State Class
Attributes having the stereotype PrimaryKey or SearchKey are represented with different icons in the containment tree of MagicDraw (see picture below).
Figure: Stereotyped Attributes of a Persistent State Class
Persistent Data
Attributes that are not marked as primary key or search key contain persistent data.
Builder 7.5.0 You can mark such attributes as private by applying stereotype <<E2EPrivate>>, but we do not recommend this.
Note | ||
---|---|---|
| ||
Attributes marked as private are not being serialized by the xUML Runtime. As the Runtime cannot distinct the context of <<E2EPrivate>>, this results in such attributes not being saved between transitions and states. |
Refer to Hiding Attributes From Interfaces for more information.
Modifying Persistent State Classes
...