Modeling Services > Relations > Integrity Checks
 
Integrity Checks
Rogue Wave® Server offers a number of functions to check the integrity of dynamically-built objects. These functions are member functions of the class IlsModel.
The integrity of an object structure is respected as long as these rules are satisfied:
*Ownership relations are strictly hierarchical and can be represented by a tree structure.
*Use relations are established only with objects that are either owned objects or entities.
A call to the following static function dynamically initiates an integrity check:
IlsModel::SetIntegrityChecked();
Note: The member function IlsModel::SetIntegrityChecked assigns a Boolean flag which tells Rogue Wave Server to check the model integrity each time the model is modified. Because this function performs a lot of costly checks, it is recommended to use this primitive only during the development phase.
This function terminates an integrity check:
IlsModel::SetIntegrityChecked(IlsFalse);
This function indicates whether the integrity check is being performed:
IlsBoolean IlsModel::IsIntegrityChecked();
The integrity check reports two types of problem:
1. Any attempt to create cycles in ownership relations. When such a problem is detected, the exception IlsOwnershipCycle is thrown.
2. Any attempt to create use relations pointing to objects which are neither the targets of ownership relations nor entities. When such a problem is detected, the exception IlsUnOwnedUse is thrown.

Version 6.3
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.