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 "Configuring a Relational Direct-to-Field Mapping (ELUG)"

m (New page: <div style="float:right;border:1px solid #000000;padding:5px">__TOC__ Related Topics</div> This section ...)
 
m
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
<div style="float:right;border:1px solid #000000;padding:5px">__TOC__
 
<div style="float:right;border:1px solid #000000;padding:5px">__TOC__
 
[[Special:Whatlinkshere/Configuring a Relational Direct-to-Field Mapping (ELUG))|Related Topics]]</div>
 
[[Special:Whatlinkshere/Configuring a Relational Direct-to-Field Mapping (ELUG))|Related Topics]]</div>
 
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%20a%20Mapping%20(ELUG)|Configuring a Mapping]].
 
  
 
For information on how to create EclipseLink mappings, see [[Creating%20a%20Mapping%20(ELUG)|Creating a Mapping]].
 
For information on how to create EclipseLink mappings, see [[Creating%20a%20Mapping%20(ELUG)|Creating a Mapping]].
 
[[#Table 34-1|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.
 
This table lists the configurable options for a relational direct-to-field mapping.
  
 
<span id="Table 34-1"></span>
 
<span id="Table 34-1"></span>
''''' Configurable Options for Relational Direct-to-Field Mapping'''''
 
  
{| class="RuleFormalMax" dir="ltr" title="Configurable Options for Relational Direct-to-Field Mapping" summary="This table lists the configurable options common to Relational Direct-to-Field Mapping and categorizes them as Basic and Advanced and indicates if the option can be configured with the OracleAS TopLink Mapping Workbench, Java, or both." width="100%" border="1" frame="border" rules="all" cellpadding="3" frame="border" rules="all"
+
{| class="RuleFormalMax" dir="ltr" title="Configurable Options for Relational Direct-to-Field Mapping" summary="This table lists the configurable options common to Relational Direct-to-Field Mapping and indicates if the option can be configured with the Workbench, Java, or both." width="100%" border="1" frame="border" rules="all" cellpadding="3" frame="border" rules="all"
 
|- align="left" valign="top"
 
|- align="left" valign="top"
! id="r1c1-t2" align="left" valign="bottom" | ''Option to Configure'''
+
! id="r1c1-t2" align="left" valign="bottom" | ''Option to Configure''
! id="r1c2-t2" align="left" valign="bottom" | ''Workbench<br />'''
+
! id="r1c2-t2" align="left" valign="bottom" | ''Workbench''
! id="r1c3-t2" align="left" valign="bottom" | ''Java'''
+
! id="r1c3-t2" align="left" valign="bottom" | ''Java''
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r2c1-t2" headers="r1c1-t2" align="left" |
 
| id="r2c1-t2" headers="r1c1-t2" align="left" |
Database field (see [[Configuring%20a%20Relational%20Mapping%20(ELUG)|Configuring a Database Field]])
+
[[Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring a Database Field|Database field]]
 
| headers="r2c1-t2 r1c2-t2" align="left" |
 
| headers="r2c1-t2 r1c2-t2" align="left" |
 
[[Image:support.gif|Supported]]<br />
 
[[Image:support.gif|Supported]]<br />
Line 32: Line 22:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r3c1-t2" headers="r1c1-t2" align="left" |
 
| id="r3c1-t2" headers="r1c1-t2" align="left" |
Method or direct field access (see [[Configuring%20a%20Mapping%20(ELUG)|Configuring Method or Direct Field Accessing at the Mapping Level]])
+
[[Configuring%20a%20Mapping%20(ELUG)#Configuring Method or Direct Field Accessing at the Mapping Level|Method or direct field access]]
 
| headers="r3c1-t2 r1c2-t2" align="left" |
 
| headers="r3c1-t2 r1c2-t2" align="left" |
 
[[Image:support.gif|Supported]]<br />
 
[[Image:support.gif|Supported]]<br />
Line 39: Line 29:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r4c1-t2" headers="r1c1-t2" align="left" |
 
| id="r4c1-t2" headers="r1c1-t2" align="left" |
Default null value (see [[Configuring%20a%20Mapping%20(ELUG)|Configuring a Default Null Value at the Mapping Level]])
+
[[Configuring%20a%20Mapping%20(ELUG)#Configuring a Default Null Value at the Mapping Level|Default null value]]
 
| headers="r4c1-t2 r1c2-t2" align="left" |
 
| headers="r4c1-t2 r1c2-t2" align="left" |
 
[[Image:support.gif|Supported]]<br />
 
[[Image:support.gif|Supported]]<br />
Line 46: Line 36:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r5c1-t2" headers="r1c1-t2" align="left" |
 
| id="r5c1-t2" headers="r1c1-t2" align="left" |
Read-only (see [[Configuring%20a%20Mapping%20(ELUG)|Configuring Read-Only Mappings]])
+
[[Configuring%20a%20Mapping%20(ELUG)#Configuring Read-Only Mappings|Read-only]]
 
| headers="r5c1-t2 r1c2-t2" align="left" |
 
| headers="r5c1-t2 r1c2-t2" align="left" |
 
[[Image:support.gif|Supported]]<br />
 
[[Image:support.gif|Supported]]<br />
Line 53: Line 43:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r6c1-t2" headers="r1c1-t2" align="left" |
 
| id="r6c1-t2" headers="r1c1-t2" align="left" |
Mapping comments (see [[Configuring%20a%20Mapping%20(ELUG)|Configuring Mapping Comments]])
+
[[Configuring%20a%20Mapping%20(ELUG)#Configuring Mapping Comments|Mapping comments]]
 
| headers="r6c1-t2 r1c2-t2" align="left" |
 
| headers="r6c1-t2 r1c2-t2" align="left" |
 
[[Image:support.gif|Supported]]<br />
 
[[Image:support.gif|Supported]]<br />
Line 60: Line 50:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r7c1-t2" headers="r1c1-t2" align="left" |
 
| id="r7c1-t2" headers="r1c1-t2" align="left" |
Serialized object converter (see [[Configuring%20a%20Mapping%20(ELUG)|Configuring a Serialized Object Converter]])
+
[[Configuring%20a%20Mapping%20(ELUG)#Configuring a Serialized Object Converter|Serialized object converter]]
 
| headers="r7c1-t2 r1c2-t2" align="left" |
 
| headers="r7c1-t2 r1c2-t2" align="left" |
 
[[Image:support.gif|Supported]]<br />
 
[[Image:support.gif|Supported]]<br />
Line 67: Line 57:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r8c1-t2" headers="r1c1-t2" align="left" |
 
| id="r8c1-t2" headers="r1c1-t2" align="left" |
Type conversion converter (see [[Configuring%20a%20Mapping%20(ELUG)|Configuring a Type Conversion Converter]])
+
[[Configuring%20a%20Mapping%20(ELUG)#Configuring a Type Conversion Converter|Type conversion converter]]
 
| headers="r8c1-t2 r1c2-t2" align="left" |
 
| headers="r8c1-t2 r1c2-t2" align="left" |
 
[[Image:support.gif|Supported]]<br />
 
[[Image:support.gif|Supported]]<br />
Line 74: Line 64:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r9c1-t2" headers="r1c1-t2" align="left" |
 
| id="r9c1-t2" headers="r1c1-t2" align="left" |
Object type converter (see [[Configuring%20a%20Mapping%20(ELUG)|Configuring an Object Type Converter]])
+
[[Configuring%20a%20Mapping%20(ELUG)#Configuring an Object Type Converter|Object type converter ]]
 
| headers="r9c1-t2 r1c2-t2" align="left" |
 
| headers="r9c1-t2 r1c2-t2" align="left" |
 
[[Image:support.gif|Supported]]<br />
 
[[Image:support.gif|Supported]]<br />
Line 82: Line 72:
  
  
For more information, see the following:
+
This example shows how to create a direct-to-field mapping and add it to a descriptor using Java code.
  
* [[Introduction%20to%20Relational%20Mappings%20(ELUG)|Direct-to-Field Mapping]]
+
<span id="Example 36-1"></span>
 +
''''' Direct-to-Field Mapping'''''
 +
 
 +
<pre>
 +
public void customize(ClassDescriptor descriptor) {
 +
    DirectToFieldMapping mapping = new DirectToFieldMapping(); 
 +
 
 +
    // configure mapping
 +
    ...
 +
 
 +
    // add mapping to descriptor
 +
    descriptor.addMapping(mapping);
 +
}
 +
</pre>
 +
 
 +
For more information, see the following:
 +
* [[Introduction%20to%20Relational%20Mappings%20(ELUG)#Direct-to-Field Mapping|Direct-to-Field Mapping]]
 
* [[Configuring%20a%20Relational%20Mapping%20(ELUG)|Configuring a Relational Mapping]]
 
* [[Configuring%20a%20Relational%20Mapping%20(ELUG)|Configuring a Relational Mapping]]
* [[Creating%20a%20Mapping%20(ELUG)|Creating a Mapping]]
+
* [[Configuring%20a%20Mapping%20(ELUG)|Configuring a Mapping]].
 +
 
  
  
Line 94: Line 101:
  
 
[[Category: EclipseLink User's Guide]]
 
[[Category: EclipseLink User's Guide]]
[[Category: Draft]]
+
[[Category: Release 1]]
 
[[Category: Concept]]
 
[[Category: Concept]]
 +
[[Category: ORM]]

Latest revision as of 07:37, 20 August 2008

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

This table lists the configurable options for a 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