Skip Headers
Oracle® TopLink Developer's Guide
10g Release 3 (10.1.3.1.0)

Part Number B28218-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

16 Understanding TopLink Mapping and Configuration Concepts

TopLink uses metadata (see "Understanding TopLink 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 Chapter 72, "Understanding TopLink Sessions"). The TopLink runtime uses this metadata in all persistence and data transformation operations.

This chapter includes information on the following:

Mapping and Configuration Concepts

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

Projects

The Project class is the primary container in which TopLink 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") for each class and each descriptor contains a mapping (see "Mappings") for each data member that TopLink should persist or transform.

Using TopLink 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 TopLink 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.

TopLink 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 TopLink Workbench, then read from the project XML file at run time.

See "Understanding 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.

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

See "Understanding Mappings" for more information.