Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Configuring a Relational Direct-to-Field Mapping (ELUG)"

m (Introduction to Relational Direct-to-Field Mapping Configuration)
m (Introduction to Relational Direct-to-Field Mapping Configuration)
Line 85: Line 85:
 
<span id="Example 36-1"></span>
 
<span id="Example 36-1"></span>
 
''''' Direct-to-Field Mapping'''''
 
''''' Direct-to-Field Mapping'''''
 +
 
<pre>
 
<pre>
 
public void customize(ClassDescriptor descriptor) {  
 
public void customize(ClassDescriptor descriptor) {  
Line 90: Line 91:
  
 
     // configure mapping
 
     // configure mapping
     ...  
+
     ...  
  
 
     // add mapping to descriptor
 
     // add mapping to descriptor

Revision as of 12:14, 29 November 2007

This section describes the various components that you must configure in order to use a relational direct-to-field mapping.

For information on how to configure EclipseLink mappings options common to two or more mapping types, see Configuring a Mapping.

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

Configurable Options for Relational Direct-to-Field Mapping lists the configurable options for a relational direct-to-field mapping.


Introduction to Relational Direct-to-Field Mapping Configuration

This table lists the configurable options for a relational direct-to-field mapping.

Configurable Options for Relational Direct-to-Field Mapping

Option to Configure Workbench Java

Database field

Supported

Supported

Method or direct field access

Supported

Supported

Default null value

Supported

Supported

Read-only

Supported

Supported

Mapping comments

Supported

Supported

Serialized object converter

Supported

Supported

Type conversion converter

Supported

Supported

Object type converter

Supported

Supported

This example shows how to create a direct-to-field mapping and add it to a descriptor using Java code.

Direct-to-Field Mapping

public void customize(ClassDescriptor descriptor) { 
    DirectToFieldMapping mapping = new DirectToFieldMapping();  

    // configure mapping
    ... 

    // add mapping to descriptor
    descriptor.addMapping(mapping);
}

For more information, see the following:



Copyright Statement

Back to the top