Skip Headers

# Mapping Architecture

Previous

Next

To define a mapping, you draw upon the following components:

- The data representation specific to the data source (such as a relational database table or schema-defined XML element) in which you store the object's data

- A descriptor for a particular object class

- An object class to map

Note: A mapping is the same regardless of whether your project is persistent or nonpersistent.

For an example of a typical TopLink mapping, see "Example Mapping".

The type of data source you define in your TopLink project determines the type of mappings you can use and how you configure them. In a persistent project, you use mappings to persist to a data source. In a nonpersistent project, you use mappings simply to transform between the object format and some other data representation (such as XML). For more information about data source and project types, see "TopLink Project Types".

A descriptor represents a particular domain object: it describes the object's class. It owns mappings: one mapping for each of the class data members that you intend to persist or transform in memory.

Note: Persistence is applicable at the descriptor level.

For more information about descriptors, see "Understanding Descriptors".

TopLink provides mappings to handle a wide variety of data types and data representations. For more information, see "Mapping Types".

All mappings are subclasses of the `oracle.toplink.mappings.DatabaseMapping` class. For more information about the mapping API, see "Understanding the Mapping API".