Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
EclipseLink/UserGuide/SDO/Using EclipseLink SDO (ELUG)
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:
- EclipseLink SDOHelperContext API
- EclipseLink HelperContext examples
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:
- EclipseLink SDODataFactory API
- EclipseLink DataFactory examples
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:
- EclipseLink SDOXMLHelper API
- EclipseLink XMLHelper examples
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:
- EclipseLink SDODataHelper API
- EclipseLink DataHelper examples
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:
- EclipseLink SDOCopyHelper API
- EclipseLink CopyHelper examples
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:
- EclipseLink SDOEqualityHelper API
- EclipseLink EqualityHelper examples
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
Information pending
Integrating SDO with JAXB
Information pending
Integrating SDO with JPA
Information pending
Using SDO as a Web Service Binding Layer
Information pending
How to Use Web Service Attachments
Information pending
Executing XPath with XML
Information pending