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 "EclipseLink/UserGuide/SDO/Introduction to EclipseLink SDO (ELUG)"

m
m
Line 42: Line 42:
 
====How to Define Metadata with EclipseLink XSDHelper====
 
====How to Define Metadata with EclipseLink XSDHelper====
 
You use the <code>XSDHelper</code> to do the following:
 
You use the <code>XSDHelper</code> to do the following:
* define SDO metadata, where SDO metadata is derived from XML schemas;
+
* Define SDO metadata, where SDO metadata is derived from XML schemas.
* generate XML schemas from SDO types.
+
* Generate XML schemas from SDO types.
  
 
You can customize metadata using the following annotations that you apply to the XML schema:
 
You can customize metadata using the following annotations that you apply to the XML schema:
* standard annotations (information pending: list them);
+
* Standard annotations (information pending: list them).
 
* EclipseLink annotations.
 
* EclipseLink annotations.
  
Line 53: Line 53:
  
 
====How to Define Metadata with EclipseLink TypeHelper====
 
====How to Define Metadata with EclipseLink TypeHelper====
This helper provides a programmatic means to define SDO metadata.  
+
You use the <code>TypeHelper</code> to do the following:
While this helper is not generally used to define metadata, it is the primary place for looking up SDO metadata.
+
* Look up SDO metadata.
 +
* Programmatically define SDO metadata (note that this is not the typical usage for <code>TypeHelper</code>).  
  
  

Revision as of 10:25, 23 April 2009

Information pending

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.


Using SDO Metadata

SDO metadata is represented as Type and Property objects. You define the metadata at run time either programmatically, or from an XML schema.


Using Type

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.

Types can have supertypes, which corresponds to the EclipseLink concept of an inheritance policy (see ...).


What You May Need to Know About Open Sequenced Type

...

What You May Need to Know About DataObject Types for Data Types

...


Using Property

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 (or an OXM Binary Mapping))
  • DataType=true + isMany=true (see OXM Direct Collection Mapping (or an 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)


Defining Metadata

You can use the following EclipseLink helper classes to define SDO metadata (information pending: document how the underlying EclipseLink metadata can be accessed and modified).


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 TypeHelper).


Using Data

Using DataObject (see 17.2.6 “Mapping converters and transformers” in JITDG/ELUG)

What You May Need to Know About Serialization in SDO (see 17.2.6.1 in JITDG/ELUG)

Using XMLDocument

What You May Need to Know About Sequence, ChangeSummary, and DataGraph

Back to the top