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 (Creating an EIS Descriptor)
m
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
[[Image:Elug draft icon.png]] '''For the latest EclipseLink documentation, please see http://www.eclipse.org/eclipselink/documentation/ '''
 +
 +
----
 
<div style="float:right;border:1px solid #000000;padding:5px">__TOC__
 
<div style="float:right;border:1px solid #000000;padding:5px">__TOC__
 
[[Special:Whatlinkshere/Creating an EIS Descriptor (ELUG)|Related Topics]]</div>
 
[[Special:Whatlinkshere/Creating an EIS Descriptor (ELUG)|Related Topics]]</div>
 
 
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%20EIS%20Descriptor%20(ELUG)|Configuring an EIS 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 information on the various types of descriptor that EclipseLink supports, see [[Introduction%20to%20Descriptors%20(ELUG)#Descriptor Types|Descriptor Types]].
==Introduction to EIS Descriptor Creation==
+
 
+
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 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 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:
 
 
* [[Introduction%20to%20Descriptors%20(ELUG)#CHECEAAE|Introduction to Descriptors]]
 
* [[Introduction%20to%20Descriptors%20(ELUG)#CHECEAAE|Introduction to Descriptors]]
 
* [[Introduction%20to%20EIS%20Descriptors%20(ELUG)|Introduction to EIS Descriptors]]
 
* [[Introduction%20to%20EIS%20Descriptors%20(ELUG)|Introduction to EIS Descriptors]]
Line 24: Line 19:
  
 
==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 the Workbench (see [[#How to Create an EIS Descriptor Using Workbench|How to Create an EIS Descriptor Using Workbench]]) or Java code (see [[#How to Create an EIS Descriptor Using Java|How to Create an EIS Descriptor Using Java]]). We recommend that you use the Workbench to create and manage your EIS descriptors.
+
 
+
  
  
 
===How to Create an EIS Descriptor Using Workbench===
 
===How to Create an EIS Descriptor Using Workbench===
 
 
Using Workbench, you can create the following types of EIS descriptor in an EIS project:
 
Using Workbench, you can create the following types of EIS descriptor in an EIS project:
 
 
* [[#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====
<div style="float:left">
+
[[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 [[Using%20Basic%20Query%20API%20(ELUG)#Using EIS Interactions|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]]</div> 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====
<div style="float:left">
+
[[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 Descriptors|EIS Root Descriptor]].
[[Image:eisdescompicon.gif|EIS composite descriptor button]]</div> 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]]).
+
 
+
  
  
 
===How to Create an EIS Descriptor Using Java===
 
===How to Create an EIS Descriptor Using Java===
 
 
This example shows how to create a relational descriptor using Java code.
 
This example shows how to create a relational descriptor using Java code.
  
Line 59: Line 44:
 
  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>.
Line 71: Line 54:
  
 
[[Category: EclipseLink User's Guide]]
 
[[Category: EclipseLink User's Guide]]
[[Category: Draft]]
+
[[Category: Release 1]]
 
[[Category: Concept]]
 
[[Category: Concept]]
 +
[[Category: EIS]]

Latest revision as of 11:11, 23 July 2012

Elug draft icon.png For the latest EclipseLink documentation, please see http://www.eclipse.org/eclipselink/documentation/


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. 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.


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.