This chapter includes the following sections:
For information on how to create more than one type of descriptors, see Chapter 118, "Creating a Descriptor".
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 descriptor that TopLink supports, see Section 16.1, "Descriptor Types".
For more information, see the following:
You can create an EIS descriptor using Oracle JDeveloper TopLink Editor, TopLink Workbench (see Section 75.2.1, "How to Create an EIS Descriptor Using TopLink Workbench"), or Java code (see Section 75.2.2, "How to Create an EIS Descriptor Using Java"). Oracle recommends that you use either Oracle JDeveloper or TopLink Workbench to create and manage your EIS descriptors.
Using TopLink Workbench, you can create the following types of EIS descriptor in an EIS project:
You can modify an EIS descriptor's behavior by configuring it as a root EIS descriptor (see Section 76.6, "Configuring an EIS Descriptor as a Root or Composite Type"). When you designate an EIS descriptor as a root, you tell the TopLink runtime that the EIS descriptor's reference class is a parent class: no other class will reference it by way of a composite object mapping or composite collection mapping. Using an EIS root descriptor, you can configure all supported mappings. You can also configure an EIS root descriptor with EIS interactions (see Section 109.8, "Using EIS Interactions"). However, if you configure the EIS root descriptor with a composite object mapping or composite collection mapping, the reference descriptor you define must be an EIS composite descriptor; it cannot be another EIS root descriptor.
By default, when you add a class to an EIS project (see Section 117.3, "Configuring Project Classpath"), TopLink Workbench creates an EIS descriptor for the class, and designates the EIS descriptor as a composite. When you designate an EIS descriptor as a composite, you tell the TopLink runtime that the EIS descriptor's reference class may be referenced by a composite object mapping or composite collection mapping. Using an EIS composite descriptor, you can configure all supported mappings. However, you cannot configure an EIS composite descriptor with EIS interactions: for this, you need an EIS root descriptor (see Section 188.8.131.52, "EIS Root Descriptors").
Example 75-1 shows how to create a relational descriptor using Java code.
EISDescriptor descriptor = new EISDescriptor(); descriptor.setJavaClass(YourClass.class);
To designate an EIS descriptor as a composite, use