This chapter describes how to create TopLink descriptors.
This chapter includes the following sections:
For information on creating different types of descriptors, see the following:
After you create a descriptor, you must configure its various options (see Chapter 119, "Configuring a Descriptor") and use it to define mappings.
For complete information on the various types of mapping that TopLink supports, see Chapter 17, "Introduction to Mappings" and Chapter 120, "Creating a Mapping"
.
For complete information on the various types of descriptor that TopLink supports, see Section 16.1, "Descriptor Types".
You can validate descriptors in the following ways:
Run the project in a test environment and watch for and interpret any exceptions that occur.
Run the TopLink integrity checker. For more information, see Section 87.2.8, "Integrity Checker".
Review the project status report. For more information, see Section 116.2.3, "How to Generate the Project Status Report".
Typically, you capture descriptor configuration in the project.xml
file and the TopLink runtime reads this information, and then creates and configures all necessary descriptor objects.
Alternatively, for relational projects only, you can export a TopLink project as a Java class (oracle.toplink.sessions.Project
) that contains all descriptor configuration in Java. This lets you use TopLink Workbench to quickly create and configure descriptors, and then, manually code features that TopLink Workbench does not support. This gives you the best of both TopLink Workbench and Java access to your descriptors. After configuring your Java project class, compile it and include it in your application's JAR file.
For more information, see Section 19.6.1, "How to Export Project Java Source Using TopLink Workbench".