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.
Difference between revisions of "Configuring a Relational Direct-to-XMLType Mapping (ELUG)"
m |
m |
||
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/Introduction to Relational Mappings (ELUG)|Related Topics]]</div> | + | [[Special:Whatlinkshere/Introduction to Relational Mappings (ELUG)|Related Topics]]</div>This section describes the various components that you must configure in order to use a relational direct-to-<tt>XMLType</tt> mapping. |
− | + | ||
− | + | ||
− | This section describes the various components that you must configure in order to use a relational direct-to-<tt>XMLType</tt> 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 configure EclipseLink mappings options common to two or more mapping types, see [[Configuring%20a%20Mapping%20(ELUG)|Configuring a Mapping]]. | ||
Line 9: | Line 6: | ||
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]]. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
This table lists the configurable options for a relational direct-to-<tt>XMLType</tt> mapping. | This table lists the configurable options for a relational direct-to-<tt>XMLType</tt> mapping. | ||
<span id="Table 35-1"></span> | <span id="Table 35-1"></span> | ||
− | |||
{| class="RuleFormalMax" dir="ltr" title="Configurable Options for Relational Direct-To-XMLType Mapping" summary="This table lists the configurable options common to Relational Direct-To-XMLType Mapping and categorizes them as Basic and Advanced and indicates if the option can be configured with the TopLink 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-XMLType Mapping" summary="This table lists the configurable options common to Relational Direct-To-XMLType Mapping and categorizes them as Basic and Advanced and indicates if the option can be configured with the TopLink 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" | ||
Line 33: | Line 24: | ||
|- align="left" valign="top" | |- align="left" valign="top" | ||
| id="r3c1-t2" headers="r1c1-t2" align="left" | | | id="r3c1-t2" headers="r1c1-t2" align="left" | | ||
− | [[Configuring%20a%20Mapping%20(ELUG)|Method or direct field access]] | + | [[Configuring%20a%20Mapping%20(ELUG)#Cofiguring Method or direct field access|Method or direct field access]] |
| headers="r3c1-t2 r1c2-t2" align="left" | | | headers="r3c1-t2 r1c2-t2" align="left" | | ||
[[Image:support.gif|Supported]] | [[Image:support.gif|Supported]] | ||
Line 86: | Line 77: | ||
==Configuring Read Whole Document== | ==Configuring Read Whole Document== | ||
− | |||
When mapping an XML Type to a Document Object Model (DOM), by default EclipseLink uses the database representation of the DOM. This allows for lazy loading of the XML data from the database. | When mapping an XML Type to a Document Object Model (DOM), by default EclipseLink uses the database representation of the DOM. This allows for lazy loading of the XML data from the database. | ||
Line 118: | Line 108: | ||
[[Category: Draft]] | [[Category: Draft]] | ||
[[Category: Task]] | [[Category: Task]] | ||
+ | [[Category: ORM]] |
Revision as of 14:45, 14 December 2007
Contents
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.
This table lists the configurable options for a relational direct-to-XMLType mapping.
Option to Configure | Workbench | Java |
---|---|---|
This example shows how to create a direct-to-XMLType mapping and add it to a descriptor using Java code.
Direct-to-XMLType Mapping
public void customize(ClassDescriptor descriptor) { DirectXMLTypeMapping mapping = new DirectXMLTypeMapping(); // configure mapping ... // add mapping to descriptor descriptor.addMapping(mapping); }
For more information, see the following:
Configuring Read Whole Document
When mapping an XML Type to a Document Object Model (DOM), by default EclipseLink uses the database representation of the DOM. This allows for lazy loading of the XML data from the database.
However, if you require the entire DOM, (or if you require the DOM to be available in a disconnected fashion from the database connection) use the Read Whole option to retrieve the entire DOM from the database.
How to Configure Read Whole Document Using Workbench
To specify that this mapping reads the whole XML document, use this procedure:
- Select the mapping in the Navigator. Its properties appear in the Editor.
- Click General. The General tab appears.
Direct to XML Mapping Property Sheet, Read Whole Document Option - Choose the Read Whole Document option to read the whole XML document. If you do not select this option, the connection must remain open for EclipseLink to read the database values.
How to Configure Read Whole Document Using Java
Use the following DirectToXMLTypeMapping methods:
- setShouldReadWholeDocument
- shouldReadWholeDocument
For more information about the available methods for DirectToXMLTypeMapping, see the EclipseLink API Reference.