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

Difference between revisions of "Creating an EIS Descriptor (ELUG)"

m
m
Line 3: Line 3:
 
This section explains how to create descriptor options specific to an EIS descriptor.
 
This section explains how to create descriptor options specific to an EIS descriptor.
  
For information on how to create more than one type of descriptors, see [[Creating%20a%20Descriptor%20(ELUG)|Creating a Descriptor]].
+
After you create a descriptor, you must configure its various options (see [[Configuring%20an%20IES%20Descriptor%20(ELUG)|Configuring an EIS Descriptor]]) and use it to define mappings.
  
After you create a descriptor, you must configure its various options (see [[Configuring%20a%20Descriptor%20(ELUG)|Configuring a Descriptor]]) and use it to define mappings.
+
For information on the various types of mapping that EclipseLink supports, see [[Introduction%20to%20Mappings%20(ELUG)|Introduction to Mappings]] and [[Creating%20a%20Mapping%20(ELUG)#CBBHHHJC|Creating a Mapping]].
  
For complete information on the various types of mapping that EclipseLink supports, see [[Introduction%20to%20Mappings%20(ELUG)|Introduction to Mappings]] and [[Creating%20a%20Mapping%20(ELUG)#CBBHHHJC|Creating a Mapping]].
+
For information on the various types of descriptor that EclipseLink supports, see [[Introduction%20to%20Descriptors%20(ELUG)#Descriptor Types|Descriptor Types]].
 
+
For complete information on the various types of descriptor that EclipseLink supports, see [[Introduction%20to%20Descriptors%20(ELUG)#Descriptor Types|Descriptor Types]].
+
  
 
For more information, see the following:
 
For more information, see the following:
Line 19: Line 17:
 
==Creating an EIS Descriptor==
 
==Creating an EIS Descriptor==
 
You can create an EIS descriptor using [[#How to Create an EIS Descriptor Using Workbench|the Workbench]] or [[#How to Create an EIS Descriptor Using Java|Java code]]. We recommend that you use the Workbench to create and manage your EIS descriptors.
 
You can create an EIS descriptor using [[#How to Create an EIS Descriptor Using Workbench|the Workbench]] or [[#How to Create an EIS Descriptor Using Java|Java code]]. We recommend that you use the Workbench to create and manage your EIS descriptors.
 
  
  
Line 26: Line 23:
 
* [[#EIS Root Descriptors|EIS Root Descriptors]]
 
* [[#EIS Root Descriptors|EIS Root Descriptors]]
 
* [[#EIS Composite Descriptors|EIS Composite Descriptors]]
 
* [[#EIS Composite Descriptors|EIS Composite Descriptors]]
 
  
  
 
====EIS Root Descriptors====
 
====EIS Root Descriptors====
 
[[Image:eisdesin.gif|EIS root descriptor button]]  You can modify an EIS descriptor's behavior by configuring it as a root EIS descriptor (see [[Configuring%20an%20EIS%20Descriptor%20(ELUG)#Configuring an EIS Descriptor as a Root or Composite Type|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%20Basic%20Query%20API%20(ELUG)#Using EIS Interactions|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.
 
[[Image:eisdesin.gif|EIS root descriptor button]]  You can modify an EIS descriptor's behavior by configuring it as a root EIS descriptor (see [[Configuring%20an%20EIS%20Descriptor%20(ELUG)#Configuring an EIS Descriptor as a Root or Composite Type|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%20Basic%20Query%20API%20(ELUG)#Using EIS Interactions|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 Descriptors====
 
[[Image:eisdescompicon.gif|EIS composite descriptor button]] By default, when you add a class to an EIS project (see [[Configuring%20a%20Project%20(ELUG)#Configuring Project Classpath|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|EIS Root Descriptors]]).
 
[[Image:eisdescompicon.gif|EIS composite descriptor button]] By default, when you add a class to an EIS project (see [[Configuring%20a%20Project%20(ELUG)#Configuring Project Classpath|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|EIS Root Descriptors]]).
 
  
  
Line 47: Line 41:
 
  EISDescriptor descriptor = new EISDescriptor();
 
  EISDescriptor descriptor = new EISDescriptor();
 
  descriptor.setJavaClass(YourClass.class);
 
  descriptor.setJavaClass(YourClass.class);
 
 
  
 
To designate an EIS descriptor as a composite, use <tt>ClassDescriptor</tt> method <tt>descriptorIsAggregate</tt>.
 
To designate an EIS descriptor as a composite, use <tt>ClassDescriptor</tt> method <tt>descriptorIsAggregate</tt>.

Revision as of 15:48, 8 January 2008

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

Back to the top