Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WBRIDGE and version 7.3.0
Div
Classe2e-refDiv

Otp
Floatingfalse

Rp

The following chapters describe how to create persistent state objects, retrieve persistent state object handles, and get copies of persistent state objects. For all these operations, actions of stereotype <<PersistentStateAdapter>> are used.

...

After creation, an object handle represents a persistent state object. With these handles, it is possible to retrieve information about and to send signals to the represented objects.
While a handle is returned by the create action and can be passed as parameter in and out of operations and services, it is also possible to retrieve a handle for an object specified by its primary key and class.
A <<PersistentStateAdapter>> instance with action set to getObjectHandle is used to implement this functionality.
The compulsory tagged value class defines what kind of object to look for. This class always has to be of stereotype <<PersistentState>>. A reference to it will also be stored in the attribute classifier of the returned handle.
As input, the persistent state adapter requires all primary keys as defined in the given class. In our example, the attributes id and customerID have the stereotype PrimaryKey and identify a persistent state object unambiguously (see class diagram in figure A Persistent State Class ). The input object flow states purchaseOrderID respectively customerID are mapped to these attributes.

Noteinfo
iconfalse

If the result set is not unique, or no persistent state object could be found, an error will be thrown that should be handled. (This is not done in this example. For more information about error handling, see section Modeling Error Handling).

...

Figure: Action State getObjectHandle (Activity Diagram Get Purchase Order) 

Noteinfo
iconfalse

The object state poHandle is of complex type Handle. This class is located in the Persistent State module in package Data / Persistent State / Services / Objects.

...

An object handle represents a single persistent object instance. The previous explains how to do this for exactly one handle. However, it is frequently necessary to retrieve sets of object handles that fulfill certain conditions.
This can be achieved by using the <<PersistentStateAdapter>> and the getObjectHandles action. The result of this action is an array of handles that corresponds to persistent objects of type class that comply with the criteria given in the identifierCondition.

Noteinfo
iconfalse

If no persistent state objects could be found, no error will be thrown. The array of handles will be empty.

...

Figure: Retrieving Handles to Multiple Persistent Objects (Activity Diagram Add Gratifications)

Noteinfo
iconfalse

The array elements of the output object flow state poHandles must be of type Handle (the Handle class is located in the Persistent State module in package Persistent State / Services / Objects).

...