3.7.1Entity modeling and applicable rules
Design items
Class, representing an entity.
Association, shows the links between entities.
* Relation : Many, or Many to Many
1 Relation : One
0..* Relation : Zero to Many
1..* Relation : One to Many
Stereotype list
An entity has an « Entity » stereotype. Additional stereotypes may be applied:
- TransientObject
Stereotype applied to a non persisted entity.
- Criteria
Stereotype applied to a criteria search entity.
An entity attribute may have various stereotypes:
- Identifier
Defines an attribute as an identifier.
- password
Defines an attribute as a password for the authentication mechanism.
- Unique
Defines an attribute as unique.
- userid
Defines an attribute as a username for the authentication mechanism.
- Required
Defines an attribute as mandatory.
- Role
Defines an attribute as a role (actor) for the authorization mechanism.
Rules
- An entity must have a unique name.
- An entity must be « Entity » stereotyped.
- Entities must be contained in a « PK_ENTITY » package.
- An entity can not be used as a parameter, or as a return type in a method.
- An entity can not be used as a class attribute (except entities made from association links, as well as BOs inheriting from those attributes)