Skip Headers
Oracle® TopLink Developer's Guide
10g (10.1.3.1.0)
B28218-01
  Go To Documentation Library
Library
Go To Product List
Product
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
 
Next
Next
 

Configuring Inheritance for a Child (Branch or Leaf) Class Descriptor

Inheritance describes how a derived (child) class inherits the characteristics of its superclass (parent). When you designate a class as a child, you must also specify the descriptor that represents the child's parent in your inheritance hierarchy.

Table 25-39 summarizes which descriptors support child inheritance configuration.

Table 25-21 Descriptor Support for Child Inheritance Configuration

Descriptor Using TopLink Workbench
Using Java

Relational Descriptors

Supported.


Supported.


Object-Relational Descriptors

Unsupported

Supported.


EIS Descriptors

Supported.


Supported.


XML Descriptors

Supported.


Supported.



For more information about inheritance, see "Descriptors and Inheritance".

For more information about configuring inheritance for a parent (root) class descriptor, see "Configuring Inheritance for a Parent (Root) Descriptor".

Using TopLink Workbench

To create a child (branch or leaf class) for an inheritance, use this procedure.

  1. In the Navigator, select the descriptor you wish to specify as a child.

  2. Choose the Inheritance tab in the Property window.

    If the Inheritance tab is not visible, right-click the descriptor and choose Select Advanced Properties > Inheritance.

  3. Select the Is Child Descriptor option to specify this descriptor is a child class. The Parent Descriptor list is now enabled and the class indicator information is disabled.

    Figure 25-32 Inheritance Tab, Child Descriptor Option

    Description of Figure 25-32 follows
    Description of "Figure 25-32 Inheritance Tab, Child Descriptor Option"

Use the following information to enter data in each child descriptor field on the tab:

Field Description
Is Child Descriptor Specify that this descriptor is a child class to be used in a branch or leaf.
    Parent Descriptor Use the list to select the parent of this descriptor. See "Descriptors and Inheritance" for more information.

Using Java

Using Java, you can configure an inheritance child descriptor using InheritancePolicy method setParentClass as Example Example 25-10 shows.

Example 25-10 Configuring an Inheritance Child Descriptor

descriptor.getInheritancePolicy().setParentClass(ChildClass.class);