Previous Table of Contents Next


5.6.3 OCL Representation of KeysIndexes Constraints


   [C-6-1]The isAscending attribute is valid only if the isSorted attribute is True.context IndexedFeature inv:self.isAscending->notEmpty implies self.index.isSorted

   [C-6-2] A KeyRelationship instance must be owned by one and only one Class instance.context KeyRelationship inv:(self.namespace->size = 1) and self.namespace.oclIsKindOf(Class)

   [C-6-3] A UniqueKey instance must be owned by one and only one Class instance.

   context UniqueKey inv:

   (self.namespace->size = 1) and self.namespace.oclIsKindOf(Class)