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