EclipseLink/UserGuide/SDO/Introduction to EclipseLink SDO (ELUG)
This section introduces EclipseLink implementation of Service Data Objects (SDO) specification, as well as provides information on how you can use it in your application development.
- 1 Using SDO Metadata
- 2 Using Data
Using SDO Metadata
SDO Type acts similarly to a Class in Java, and provides much of the same metadata as the Java Reflection API provides for Java classes.
In EclipseLink, a Type wraps an object-XML mapping (OXM) descriptor.
A Type can have supertypes, which corresponds to the EclipseLink concept of an inheritance policy (see Inheritance Policy in Descriptor API).
For more information, see Type API.
What You May Need to Know About Open Sequenced Type
What You May Need to Know About DataObject Types for Data Types
SDO Property acts similarly to a property in Java and provides much of the same metadata as the Java Reflection API provides for Java fields or methods.
In EclipseLink, a Property wraps an object-XML mapping in the following way:
- DataType=true + isMany=false (see OXM Direct Mapping and OXM Binary Mapping)
- DataType=true + isMany=true (see OXM Direct Collection Mapping and OXM Binary Collection Mapping)
- DataType=false + isMany=false + containment=true (see [| OXM Composite Object Mapping])
- DataType=false + isMany=true + containment=true (see OXM Composite Collection Mapping)
- DataType=false + isMany=false + containment=false (see OXM Reference Mapping)
- DataType=false + isMany=true + containment=false (see OXM Collection Reference Mapping)
For more information, see Property API.
You can use the following EclipseLink helper classes to define SDO metadata (information pending: modifying and accessing the underlying EclipseLink metadata).
How to Define Metadata with EclipseLink XSDHelper
You use the XSDHelper to do the following:
- Define SDO metadata, where SDO metadata is derived from XML schemas.
- Generate XML schemas from SDO types.
You can customize metadata using the following annotations that you apply to the XML schema:
- Standard annotations (information pending: list them).
- EclipseLink annotations.
You can also use various APIs to determine the XML representation about the SDO metadata.
How to Define Metadata with EclipseLink TypeHelper
You use the TypeHelper to do the following:
- Look up SDO metadata.
- Programmatically define SDO metadata (note that this is not the typical usage for the TypeHelper).
Using DataObject (see 17.2.6 “Mapping converters and transformers” in JITDG/ELUG)
DataObject in SDO corresponds to a Java Object (POJO). To define object-XML mappings, you map the DataObject to XML. You can create your DataObject as either dynamic (see Dynamic DataObject Examples), or static by applying a type-safe interface to it (see Static DataObject Examples). The DataObject provides an XPath-like (see Mappings and XPath) means of data access. For example, the following code is valid in SDO:
The standard JAXB, however, would require the following:
For more information, see DataObject API
What You May Need to Know About Serialization in SDO (see 184.108.40.206 in JITDG/ELUG)
SDO has its own Java serialization format.
When you marshall (save) a DataObject to XML, or unmarshall an XML document into objects, the XMLDocument class contains information about the root of the XML document.
What You May Need to Know About Sequence, ChangeSummary, and DataGraph
The following SDO classes... :(information pending)