Creating Object and SQLJ Object Abstract Data Types

If you select the OBJECT (or SQLJ OBJECT) type for an abstract data type, two additional tabs are displayed in the property sheet:

  • The Attributes tab allows you to specify an object (or SQLJ object) with a number of attributes to which are assigned appropriate data types

  • The Procedures tab allows you to specify an object (or SQLJ object) with a number of procedures to which are assigned appropriate parameters

An object abstract data type with a supertype can inherit non-final procedures. You can use the Inherit Procedure tool in the Procedures tab of the abstract data type to select a non-final procedure from a parent abstract data type. Inheritance only applies to non-finale procedures.

In the following example, you want to create an Address object with Street, City, and ZipCode attributes, and a Location procedure:

  1. Open the property sheet of the abstract data type and select either OBJECT or SQLJ_OBJECT from the type list.

    The Attributes and Procedures tabs are displayed.

  2. Click the Attributes tab.


  3. For each attribute, click the Add a Row tool, and:
    • enter a Name and Code

    • select a data type class from the Data Type list

    • [optional] Select the Mandatory (M) checkbox

  4. Click the Procedures tab:


  5. For each procedure, click the Add a Row tool, and:
    • enter a Name and Code

    • [optional] Select the Final (F), Static (S) and/or Abstract (A) columns

  6. Click OK in each of the dialog boxes.