Home / Middleware / Oracle Fusion Middleware Online Documentation Library, 11g Release 1 (11.1.1.3.0) / Developer Guides
Fusion Middleware Developer's Guide for Oracle TopLink
ContentsOpens a new window
Opens a new window
Page 99 of 158

75 Creating an EIS Descriptor

This chapter explains how to create descriptor options specific to an EIS descriptor.

This chapter includes the following sections:

For information on how to create more than one type of descriptors, see Chapter 118, "Creating a Descriptor"Opens a new window.

75.1 Introduction to EIS Descriptor Creation

After you create a descriptor, you must configure its various options (see Chapter 119, "Configuring a Descriptor"Opens a new window) and use it to define mappings.

For complete information on the various types of mapping that TopLink supports, see Chapter 17, "Introduction to Mappings"Opens a new window and Chapter 120, "Creating a Mapping"Opens a new window.

For complete information on the various types of descriptor that TopLink supports, see Section 16.1, "Descriptor Types"Opens a new window.

For more information, see the following:

75.2 Creating an EIS Descriptor

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"Opens a new window), or Java code (see Section 75.2.2, "How to Create an EIS Descriptor Using Java"Opens a new window). Oracle recommends that you use either Oracle JDeveloper or TopLink Workbench to create and manage your EIS descriptors.

75.2.1 How to Create an EIS Descriptor Using TopLink Workbench

Using TopLink Workbench, you can create the following types of EIS descriptor in an EIS project:

75.2.1.1 EIS Root Descriptors

EIS root descriptor button
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"Opens a new window). 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"Opens a new window). 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.

75.2.1.2 EIS Composite Descriptors

EIS composite descriptor button
By default, when you add a class to an EIS project (see Section 117.3, "Configuring Project Classpath"Opens a new window), 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 75.2.1.1, "EIS Root Descriptors"Opens a new window).

75.2.2 How to Create an EIS Descriptor Using Java

Example 75-1Opens a new window shows how to create a relational descriptor using Java code.

Example 75-1 Creating an EIS Descriptor in Java

EISDescriptor descriptor = new EISDescriptor();
descriptor.setJavaClass(YourClass.class);

To designate an EIS descriptor as a composite, use ClassDescriptor method descriptorIsAggregate.