118 Creating a Descriptor

This chapter describes how to create TopLink descriptors.

This chapter includes the following sections:

118.1 Introduction to Descriptor Creation

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".

118.2 Validating Descriptors

You can validate descriptors in the following ways:

118.3 Generating Java Code for Descriptors

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".