Maintaining a Class in the Export Package Browser

You can maintain the attributes of a class selected in the Class List of the Export Package Browser if you want attributes of a class in the exported package to differ from those of the class in the schema from which the package was built.

To maintain a class in the exported package by using the Export Package Browser

  1. In the Class List of the Export Package Browser, right-click on the class whose attributes you want to view or change and then select the Change command from the popup menu that is then displayed. (Alternatively, select the class and then select the Change command from the Classes menu.)

    The Exported Class Options dialog, shown in the following image, is then displayed.

    Attributes that cannot be changed are disabled.

  2. In the Class Lifetimes group box, perform the following actions.

    1. If you do not want the class to have persistent instances, uncheck the Allow Persistent Instances check box. (This check box is disabled if the Allow Persistent Subclass Instances check box was unchecked in the superclass of this class.)

      When this is unchecked, an exception is raised at every attempt to create a persistent instance of the class. A compiler error is raised if you attempt to construct a persistent object from within a method (that is, you call create <object-name> persistent).

    2. If you do not want the class to have non-shared transient instances, uncheck the Allow Transient Instances check box. (The Allow Transient Instances check box is disabled if the Allow Transient Subclass Instances check box was unchecked in the superclass of this class.)

      When this is unchecked, an exception is raised at every attempt to create a non-shared transient instance of the class. A compiler error is raised if you attempt to construct a transient object from within a method (that is, you call create <object-name> transient).

    3. If you do not want the class to have shared transient instances, uncheck the Allow Shared Transient Instances check box. (The Allow Shared Transient Instances check box is disabled if the Allow Shared Transient Subclass Instances check box was unchecked in the superclass of this class.)

      When this is unchecked, an exception is raised at every attempt to create a shared transient instance of the class. A compiler error is raised if you attempt to construct a shared transient object from within a method (that is, you call create <object-name> sharedTransient).

  3. Select the Transient option button in the Persistence group box if you do not want the default lifetime of instances of the class to be persistent. By default, the default lifetime of class instances is persistent. You can still create a transient instance of a persistent class and a persistent instance of a transient class.

    Use the check boxes in the Class Lifetimes group box to restrict creation of class instances.

  4. Click the OK button to update the class attributes. Alternatively, click the Cancel button to abandon your selections.

For details about using the Export Package Browser to view and maintain classes in an existing exported package, see "Browsing and Maintaining an Exported Package", earlier in this chapter.