Defining Membership of a Collection Class

The Class sheet of the Define Class dialog is displayed after you have specified your class options for a collection subclass and you then select the Membership sheet of the dialog.

To specify the membership of your collection subclass

  1. In the list of classes or primitive types in the Membership combo box, select the class or primitive type that is to be contained in the new collection class.

    All classes and primitive types in the current schema are listed in alphabetical order, to enable you to select the required class or primitive type.

  2. If you are adding an array with membership Binary, String, or StringUtf8 primitive type, the Length text box and Maximum Length check box are enabled.

    The specified length value cannot exceed the maximum supported length for the membership type, as follows.

    • Binary - 16,000 bytes

    • String - 15,999 characters

    • StringUtf8 - 8,000 UTF8 characters

    When decreasing the length of String, StringUtf8, or Binary keys in dictionaries, all key values must be less than or equal to the new key length. Instances of String or Binary keys that are longer than a decreased key length are not truncated during the reorganization process, but cause the reorganization to fail and an exception to be raised.

  3. If you select the Decimal primitive type for membership of an array class, the Scale Factor text box is enabled.

    When you check this check box to define the scale factor for entries in the array, values are rounded to the number of decimal places specified by the scale factor when they are added to the array.

  4. Click the OK button. Alternatively, click the Cancel button to abandon your selections or the Next button to define another class.

If you are adding a subclass to a dictionary class, you must then select the Keys sheet. Alternatively, you can select the Lifetime sheet if you want to restrict the lifetime of instances of the class and its subclasses, the Tuning sheet if you want to tune a Collection subclass, or the Volatility sheet if you want to change the volatility of instances of the class.

If you are not adding a subclass to a dictionary class, the specified class is then displayed as a subclass of the selected superclass in the Class Browser window.