Oracle TopLink Developer's Guide 10g Release 3 (10.1.3) B13593-01 |
|
![]() Previous |
![]() Next |
Some TopLink descriptor features cannot be configured from TopLink Workbench. To use these features, you must write a Java method to amend the descriptor after it is loaded as part of the project. This method must have the following characteristics:
Be public static.
Take a single parameter of type oracle.toplink.descriptors.ClassDescriptor
.
In the implementation of this method, you can configure advanced features of the descriptor using any of the public descriptor and mapping API.
Table 28-39 summarizes which descriptors support amendment methods.
Table 28-39 Descriptor Support for Amendment Methods
Descriptor | Using TopLink Workbench |
Using Java |
---|---|---|
Relational Descriptors |
|
![]() |
Object-Relational Descriptors |
![]() |
![]() |
EIS Descriptors |
|
![]() |
XML Descriptors |
|
![]() |
This section describes how to associate an amendment method with a descriptor.
For more information about how to implement an amendment method, see "Amendment and After-Load Methods".
To customize a session, use a session customizer class (see "Configuring Customizer Class").
To use an amendment method with a descriptor (after it is loaded as part of the project) use this procedure:
Select a descriptor in the Navigator. Its properties appear in the Editor.
If the After load advanced property is not visible for the descriptor, right-click the descriptor and choose Select Advanced Properties > After Load from context menu or from the Selected menu.
Use the following information to enter data in each field on the tab:
Field | Description |
---|---|
Class | Click Browse and choose the class of the method to execute. |
Static Method | Use the Static Method list to choose the static method to execute at run time, after loading the descriptor. The method must be public static and take a single attribute of type oracle.toplink.descriptors.ClassDescriptor . |