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 "Introduction to EclipseLink Mapping and Configuration (ELUG)"

m (linked to Introduction to Projects (ELUG))
m
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div style="margin:5px;float:right;border:1px solid #000000;padding:5px">__TOC__
+
[[Image:Elug draft icon.png]] '''For the latest EclipseLink documentation, please see http://www.eclipse.org/eclipselink/documentation/ '''
[[Special:Whatlinkshere/Introduction to EclipseLink Mapping and Configuration (ELUG)|Related Topics]]</div>EclipseLink uses metadata (see [[EclipseLink%20Application%20Development%20(ELUG)|Working with EclipseLink Metadata]]) to describe how objects relate to a data source representation. Your mapping and configuration activities construct this metadata.
+
  
After creating the metadata, you can use it in any number of applications by referencing the metadata from a session (see [[Introduction%20to%20EclipseLink%20Sessions%20(ELUG)|Introduction to EclipseLink Sessions]]). The EclipseLink runtime uses this metadata in all persistence and data transformation operations.
+
----
  
 +
<div style="margin:5px;float:right;border:1px solid #000000;padding:5px">__TOC__
 +
[[Special:Whatlinkshere/Introduction to EclipseLink Mapping and Configuration (ELUG)|Related Topics]]</div>EclipseLink uses [[Introduction to EclipseLink Application Development (ELUG)#Working with EclipseLink Metadata|metadata]] to describe how objects relate to a data source representation. Your mapping and configuration activities construct this metadata.
 +
 +
After creating the metadata, you can use it in any number of applications by referencing the metadata from [[Introduction%20to%20EclipseLink%20Sessions%20(ELUG)|a session]]. The EclipseLink runtime uses this metadata in all persistence and data transformation operations.
  
  
Line 12: Line 15:
 
* [[#Descriptors|Descriptors]]
 
* [[#Descriptors|Descriptors]]
 
* [[#Mappings|Mappings]]
 
* [[#Mappings|Mappings]]
 
  
  
Line 18: Line 20:
 
The <code>Project</code> class is the primary container in which EclipseLink stores its mapping and configuration metadata. A project relates a set of object classes to a data source at the data model level.
 
The <code>Project</code> class is the primary container in which EclipseLink stores its mapping and configuration metadata. A project relates a set of object classes to a data source at the data model level.
  
A project contains a descriptor (see [[#Descriptors|Descriptors]]) for each class and each descriptor contains a mapping (see [[#Mappings|Mappings]]) for each data member that EclipseLink should persist or transform.
+
A project contains [[#Descriptors|a descriptor]] for each class and each descriptor contains [[#Mappings|a mapping]] for each data member that EclipseLink should persist or transform.
  
Using the Workbench, you can export mapping and configuration metadata into a deployment XML file called <code>project</code>. For more information, see [[Creating%20a%20Project%20(ELUG)|Exporting Project Information]].
+
Using the Workbench, you can export mapping and configuration metadata into a deployment XML file called <code>project</code>. For more information, see [[Creating%20a%20Project%20(ELUG)#Exporting Project Information|Exporting Project Information]].
  
After creating the project XML file, you must associate it with a session so that EclipseLink can use it at run time. For more information, see [[Configuring%20a%20Session%20(ELUG)|Configuring a Primary Mapping Project]].
+
After creating the project XML file, you must associate it with a session so that EclipseLink can use it at run time. For more information, see [[Configuring%20a%20Session%20(ELUG)#Configuring a Primary Mapping Project|Configuring a Primary Mapping Project]].
  
 
For Enterprise JavaBeans (EJB) applications where there is no session, deploy the project XML file to the target application server. In this context, the project XML file is also known as the deployment XML file.
 
For Enterprise JavaBeans (EJB) applications where there is no session, deploy the project XML file to the target application server. In this context, the project XML file is also known as the deployment XML file.
  
 
For more information, see the following:
 
For more information, see the following:
* [[Creating%20EclipseLink%20Files%20for%20Deployment%20(ELUG)|sessions.xml File]]
+
* [[Creating%20EclipseLink%20Files%20for%20Deployment%20(ELUG)#sessions.xml File|sessions.xml File]]
* [[Creating%20EclipseLink%20Files%20for%20Deployment%20(ELUG)|project.xml File]]
+
* [[Creating%20EclipseLink%20Files%20for%20Deployment%20(ELUG)#project.xml File|project.xml File]]
 
* [[Introduction to Projects (ELUG)|Introduction to Projects]].
 
* [[Introduction to Projects (ELUG)|Introduction to Projects]].
 +
  
 
===Descriptors===
 
===Descriptors===
Line 37: Line 40:
  
 
See [[Introduction%20to%20Descriptors%20(ELUG)|Introduction to Descriptors]] for more information.
 
See [[Introduction%20to%20Descriptors%20(ELUG)|Introduction to Descriptors]] for more information.
 +
  
 
===Mappings===
 
===Mappings===
 
Mappings describe how individual object attributes relate to a data source representation. Mappings can involve a complex transformation or a direct entry.
 
Mappings describe how individual object attributes relate to a data source representation. Mappings can involve a complex transformation or a direct entry.
  
EclipseLink uses mappings to determine how to transform data between object and data source representation. Most mapping information can be defined by the Workbench, then read from the project XML file at run time. Mappings are owned by descriptors (see [[#Descriptors|Descriptors]]).
+
EclipseLink uses mappings to determine how to transform data between object and data source representation. Most mapping information can be defined by the Workbench, then read from the project XML file at run time. Mappings are owned by [[#Descriptors|Descriptors]].
  
 
See [[Introduction%20to%20Mappings%20(ELUG)|Introduction to Mappings]] for more information.
 
See [[Introduction%20to%20Mappings%20(ELUG)|Introduction to Mappings]] for more information.
Line 51: Line 55:
  
 
[[Category: EclipseLink User's Guide]]
 
[[Category: EclipseLink User's Guide]]
[[Category: Draft]]
+
[[Category: Release 1]]
 
[[Category: Concept]]
 
[[Category: Concept]]

Latest revision as of 11:23, 18 July 2012

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


EclipseLink uses metadata to describe how objects relate to a data source representation. Your mapping and configuration activities construct this metadata.

After creating the metadata, you can use it in any number of applications by referencing the metadata from a session. The EclipseLink runtime uses this metadata in all persistence and data transformation operations.


Mapping and Configuration Concepts

This section describes concepts unique to EclipseLink mapping and configuration, including the following:


Projects

The Project class is the primary container in which EclipseLink stores its mapping and configuration metadata. A project relates a set of object classes to a data source at the data model level.

A project contains a descriptor for each class and each descriptor contains a mapping for each data member that EclipseLink should persist or transform.

Using the Workbench, you can export mapping and configuration metadata into a deployment XML file called project. For more information, see Exporting Project Information.

After creating the project XML file, you must associate it with a session so that EclipseLink can use it at run time. For more information, see Configuring a Primary Mapping Project.

For Enterprise JavaBeans (EJB) applications where there is no session, deploy the project XML file to the target application server. In this context, the project XML file is also known as the deployment XML file.

For more information, see the following:


Descriptors

Descriptors describe how a Java class relates to a data source representation. They relate object classes to the data source at the data model level. For example, persistent class attributes may map to database columns.

EclipseLink uses descriptors to store the information that describes how an instance of a particular class can be represented in a data source (see Mappings). Most descriptor information can be defined by the Workbench, then read from the project XML file at run time.

See Introduction to Descriptors for more information.


Mappings

Mappings describe how individual object attributes relate to a data source representation. Mappings can involve a complex transformation or a direct entry.

EclipseLink uses mappings to determine how to transform data between object and data source representation. Most mapping information can be defined by the Workbench, then read from the project XML file at run time. Mappings are owned by Descriptors.

See Introduction to Mappings for more information.



Copyright Statement

Back to the top