Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Creating an EIS Descriptor (ELUG)

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

After you create a descriptor, you must configure its various options (see Configuring an EIS Descriptor) and use it to define mappings.

For information on the various types of mapping that EclipseLink supports, see Introduction to Mappings and Creating a Mapping.

For information on the various types of descriptor that EclipseLink supports, see Descriptor Types.

For more information, see the following:


Creating an EIS Descriptor

You can create an EIS descriptor using the Workbench or Java code. We recommend that you use the Workbench to create and manage your EIS descriptors.


How to Create an EIS Descriptor Using Workbench

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


EIS Root Descriptors

EIS root 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 EclipseLink 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 button By default, when you add a class to an EIS project (see Configuring Project Classpath), 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 EclipseLink 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).


How to Create an EIS Descriptor Using Java

This example shows how to create a relational descriptor using Java code.


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.



Copyright Statement

Copyright © Eclipse Foundation, Inc. All Rights Reserved.