| Oracle® TopLink Developer's Guide 10g (10.1.3.1.0) B28218-01 |
|
![]() Previous |
![]() Next |
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 |
|
|
|
Object-Relational Descriptors |
![]() |
|
|
EIS Descriptors |
|
|
|
XML Descriptors |
|
|
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".
To create a child (branch or leaf class) for an inheritance, use this procedure.
In the Navigator, select the descriptor you wish to specify as a child.
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.
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

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, you can configure an inheritance child descriptor using InheritancePolicy method setParentClass as Example Example 25-10 shows.