Skip Headers
Oracle TopLink Developer's Guide
10g Release 3 (10.1.3)
B13593-01
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

Creating an EIS Descriptor

You can create an EIS descriptor using TopLink Workbench (see "Using TopLink Workbench") or Java code (see "Using Java"). Oracle recommends that you use TopLink Workbench to create and manage your EIS descriptors.

For more information, see "EIS Descriptors".

Using TopLink Workbench

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

EIS Root Descriptors

Aggregate Descriptor button.
You can modify an EIS descriptor's behavior by configuring it as a root EIS descriptor (see "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 "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.

EIS Composite Descriptors

EIS composite descriptor
By default, when you add a class to an EIS project (see "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 "EIS Root Descriptors").

Using Java

Example 27-5 shows how to create a relational descriptor using Java code.

Example 27-5 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.