Previous Topic: OperationNext Topic: Encapsulation Options


Encapsulation

Encapsulation means that the entity type's implementation (action diagrams and data storage) can be changed without impacting the users of the entity type. Persistent views of an encapsulated entity type may only occur within its own operations, or in the operations of a supertype or subtype. Hence create, update, delete, and read actions on occurrences of this type are confined to operations of the type, its subtype or supertype.

An encapsulated entity type may not have persistent relationships. Hence associate, disassociate, and transfer actions are not available.

The features of encapsulated entity types may be protected. Protected features are only visible within the operations of the entity type owning the feature. By default, all basic and designed attributes of an encapsulated entity type are protected unless the attribute is a part of a primary identifier.

In projects performing object modeling, the recommended encapsulation level is restricted. But in some situations, encapsulated will be preferred: