Difference between revisions of "EclipseLink/UserGuide/SDO/Using EclipseLink SDO (ELUG)"

From Eclipsepedia

Jump to: navigation, search
m (Generating Static SDO Classes at Design Time)
m (Performing Integration)
Line 121: Line 121:
  
 
==Performing Integration==
 
==Performing Integration==
Information pending
+
You can integrate your SDO application with the following technologies:
 +
* [[#Integrating SDO with JAXB | JAXB]]
 +
* [[#Integrating SDO with JPA | JPA]]
  
 +
The first step in this integration proccess is to create POJO/SDO bridge.
  
  
 
===Integrating SDO with JAXB===
 
===Integrating SDO with JAXB===
Information pending
+
For information and examples, see [http://wiki.eclipse.org/EclipseLink/Examples/SDO/JAXB SDO-JAXB Integration with EclipseLink]].
 
+
  
  
 
===Integrating SDO with JPA===
 
===Integrating SDO with JPA===
Information pending
+
For information and examples, see [http://wiki.eclipse.org/EclipseLink/Examples/SDO/JPA SDO-JPA Integration with EclipseLink]].
 
+
 
+
  
 
==Using SDO as a Web Service Binding Layer==
 
==Using SDO as a Web Service Binding Layer==

Revision as of 14:13, 1 May 2009

This section explains where and how you use EclipseLink SDO to customize your application to meet requirements.


Contents

Performing Actions on Data Objects at Run Time

Use the following classes to perform actions on your data objects:


For more information, see EclipseLink SDO examples.


Using HelperContext

SDO defines a HelperContext interface. You use it to access related SDO helper classes that let you perform common operations such as reading and writing XML documents, defining SDO types from XML Schema, and so on.

To obtain a default context, call the HelperProvider getDefaultContext method.

You can create the local context provided by EclipseLink as follows:

HelperContext helperContext = new SDOHelperContext();

For more information, see the following:


What You May Need to Know About Local and Global HelperContext

All the helpers that you can retrieve using accessor methods or instance fields of the global HelperContext have visibility to the global SDO metadata, that is, their scope of execution is global.

The opposite is true for the local HelperContext, such as the SDOHelperContext provided by EclipseLink: you can use it to obtain helpers that have visibility to the local SDO metadata.

Using the EclipseLink SDOHelperContext makeDefaultContext method, you can promote your local context to become the global (default) one.


Using DataFactory

You use the DataFactory to create disconnected instances of a DataObject. That is, the newly created DataObject instances have no set properties and no container.

You can obtain the default DataFactory from the INSTANCE field or from the getDataFactory method of the default HelperContext.

You can also define and retrieve the HelperContext from your EclipseLink SDODataFactory.

For more information, see the following:


Using XMLHelper

You use the XMLHelper to convert XML documents into data objects, and vice versa. The two main operations of the XMLHelper are load and save.

You can obtain the default XMLHelper from the INSTANCE field or from the getXMLHelper method of the default HelperContext.

The EclipseLink SDOXMLHelper initializeDescriptor method allows you to define an XML descriptor for your application.

For more information, see the following:


Using DataHelper

The main purpose of the DataHelper is to enable conversion of values used with data objects between data types.

You can obtain the default DataHelper from the INSTANCE field or from the getDataHelper method of the default HelperContext.

You can also define and retrieve the HelperContext from your EclipseLink SDODataHelper.

For more information, see the following:


Using CopyHelper

You use the CopyHelper to create the following types of copies of data objects:

  • a copy of a DataObject's values with DataType properties;
  • a copy of a tree of DataObject instances.

You can obtain the default CopyHelper from the INSTANCE field or from the getCopyHelper method of the default HelperContext.

You can also define and retrieve the HelperContext from your EclipseLink SDOCopyHelper.

For more information, see the following:


Using EqualityHelper

An EqualityHelper provides methods to compare data objects and let you determine the following:

  • whether or not two DataObject instances have the same values for their DataType properties;
  • whether or not two trees of data objects are equal.

You can obtain the default EqualityHelper from the INSTANCE field or from the getEqualityHelper method of the default HelperContext.

You can also define and retrieve the HelperContext from your EclipseLink SDOEqualityHelper.

For more information, see the following:

Generating Static SDO Classes at Design Time

If you know the metadata, such as, for example, the XML schema definition or the SQL relational schema, at development time, you can use the code-generating interfaces for data objects. SDO enables static data API code generation from a variety of metamodels, including the following:

  • XML schema languages;
  • relational database schemas with queries known at the time of code generation;
  • Web services, when the message is specified by an XML schema;
  • JCA connectors;
  • JMS message formats;
  • UML models.

Note that when you use static data APIs, the dynamic data APIs are still available to you.

Information pending.

Performing Integration

You can integrate your SDO application with the following technologies:

The first step in this integration proccess is to create POJO/SDO bridge.


Integrating SDO with JAXB

For information and examples, see SDO-JAXB Integration with EclipseLink].


Integrating SDO with JPA

For information and examples, see SDO-JPA Integration with EclipseLink].

Using SDO as a Web Service Binding Layer

Information pending


How to Use Web Service Attachments

Information pending


Executing XPath with XML

Information pending



Copyright Statement