Jump to: navigation, search

Configuring an EIS Mapping (ELUG)

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


For information on how to create EclipseLink mappings, see Creating a Mapping.

This table lists the types of EIS mappings that you can configure and provides a cross-reference to the type-specific chapter that lists the configurable options supported by that type.


If you are creating... See...

EIS direct mapping

Configuring an EIS Direct Mapping

EIS composite direct collection mapping

Configuring an EIS Composite Direct Collection Mapping

EIS composite object mapping

Configuring an EIS Composite Object Mapping

EIS composite collection mapping

Configuring an EIS Composite Collection Mapping

EIS one-to-one mapping

Configuring an EIS One-to-One Mapping

EIS one-to-many mapping

Configuring an EIS One-to-Many Mapping

EIS transformation mapping

Configuring an EIS Transformation Mapping


Fore more information, see the following:


Configuring Common EIS Mapping Options

This table lists the configurable options shared by two or more EIS mapping types. In addition to the configurable options described here, you must also configure the options described for the specific EIS mapping types (see EIS Mapping Types), as shown in the following table.


Option to Configure Workbench Java

Read-only

Supported

Supported

Indirection (lazy loading)

Supported

Supported

XPath

Supported

Supported

Default null value

Supported

Supported

Reference descriptors

Supported

Supported

Configuring Method or Direct Field Accessing at the Mapping Level

Supported

Supported

Private or independent relationships

Supported

Supported

Comments

Supported

Supported

Serialized object converter

Supported

Supported

Type conversion converter

Supported

Supported

Object type converter

Supported

Supported

Simple type translator

Supported

Supported

Container policy

Supported

Supported

Selection interaction

Supported

Supported

Use of a single node

Supported

Supported

JAXB typesafe enumeration converter

Unsupported

Supported


Configuring Reference Descriptors

In EIS mappings that extend org.eclipse.persistence.mappings.ForeignReferenceMapping or org.eclipse.persistence.mappings.AggregateMapping class, attributes reference other EclipseLink descriptors–not the data source. You can select a descriptor in the current project, or a descriptor from some other project.

This table summarizes which EIS mappings support this option.


Mapping Support for Reference Descriptor

Mapping Using the Workbench
Using Java

Direct mapping

Unsupported.

Unsupported.

Composite direct collection mapping

Unsupported.

Unsupported.

Composite object mapping

Supported.

Supported.

Composite collection mapping

Supported.

Supported.

One-to-one mapping

Supported.

Supported.

One-to-many mapping

Supported.

Supported.

Transformation mapping

Unsupported.

Unsupported.


How to Configure Reference Descriptors Using Workbench

To specify a reference descriptor for an EIS mapping, use this procedure.

  1. Select the mapped attribute in the Navigator. Its properties appear in the Editor.
  2. Click the General tab. The General tab appears.
    General Tab, Reference Descriptor Field
    General Tab, Reference Descriptor Field

  3. Use the Reference Descriptor field to select the descriptor referenced by this relationship mapping.


Note: For one-to-one and one-to-many EIS mappings, the reference descriptor must be a root descriptor. See Configuring an EIS Descriptor as a Root or Composite Type.


You can specify a reference descriptor that is not in the current Workbench project. For example, to create a mapping to an Employee class that does not exist in the current project, do the following:

  1. Add the Employee class to your current project. See Working with Projects.
  2. Create the relationship mapping to the Employee descriptor.
  3. Deactivate the Employee descriptor. See Active and Inactive Descriptors.

When you generate the deployment XML for your project, the mapping to the Employee class will be included, but not the Employee class itself.


Configuring Selection Interaction

In EIS mappings that extend org.eclipse.persistence.mappings.ForeignReferenceMapping class, EclipseLink uses a selection interaction to acquire the instance of the target object to which the mapping refers.

By default, EclipseLink uses the read interaction you define for the mapping's reference descriptor (see Configuring Reference Descriptors). In most cases, this interaction is sufficient. If the reference descriptor's read interaction is not sufficient, you can define a separate interaction.

This table summarizes which EIS mappings support this option.


Mapping Support for Selection Interaction

Mapping Using the Workbench
Using Java

Direct mapping

Unsupported.

Unsupported.

Composite direct collection mapping

Unsupported.

Unsupported.

One-to-one mapping

Unsupported.

Unsupported.

One-to-many mapping

Unsupported.

Unsupported.

Composite object mapping

Supported.

Supported.

Composite collection mapping

Supported.

Supported.

Transformation mapping

Unsupported.

Unsupported.


For more information about how EclipseLink uses the selection criteria, see Reference EIS Mappings.


How to Configure Selection Interaction Using Workbench

To specify the selection interaction (such as Read Object) for the EIS mapping, use this procedure:

  1. Select the one-to-many EIS mapping in the Navigator. Its properties appear in the Editor.
  2. Click the Selection Interaction tab. The Selection Interaction tab appears.
    Selection Interaction Tab
    Selection Interaction Tab

  3. Complete each field on the tab.

Use the following information to enter data in each field on the tab:

Field Description
Function Name The name of the EIS function that this call type (Read Object or Read All) invokes on the EIS.
Input Record Name The name passed to the JCA adapter when creating the input record.
Input Root Element Name The root element name to use for the input DOM.
Input Arguments

The query argument name to map to the interaction field or XPath nodes in the argument record. For example, if you are using XML records, use this option to map input argument name to the XPath name/first-name.

Output Arguments

The result record field or XPath nodes to map to the correct nodes in the record used by the descriptor's mappings. For example, if you are using XML records, use this option to map the output fname to name/first-name.

Output arguments are not required if the interaction returns an XML result that matches the descriptor's mappings.

Input Result Path

Use this option if the EIS interaction expects the interaction arguments to be nested in the XML record. For example, specify arguments, if the arguments were to be nested under the root element exec-find-order, then under an arguments element.

Output Result Path The name of the EIS function that this call type (Read Object or Read All) invokes on the EIS.
Properties Any properties required by your EIS platform. For example, property name operation (from AQPlatform.QUEUE_OPERATION) and property value enqueue (from AQPlatform.ENQUEUE).





Copyright Statement