Difference between revisions of "EclipseLink/Examples/SDO/DynamicAPI"

From Eclipsepedia

Jump to: navigation, search
(Using DataFactory)
Line 1: Line 1:
 
==Creating DataObjects==
 
==Creating DataObjects==
 
===Using DataFactory===
 
===Using DataFactory===
 +
DataObjects can be created by Type using DataFactory:
 +
<source lang="java">
 +
Type addressType = TypeHelper.INSTANCE.getType("http://www.example.org/customer-example", "address-type");
 +
DataObject addressDO = DataFactory.INSTANCE.create(addressType);
 +
</source>
 +
 
===Using DataObject===
 
===Using DataObject===

Revision as of 16:31, 24 February 2009

Creating DataObjects

Using DataFactory

DataObjects can be created by Type using DataFactory:

Type addressType = TypeHelper.INSTANCE.getType("http://www.example.org/customer-example", "address-type");
DataObject addressDO = DataFactory.INSTANCE.create(addressType);

Using DataObject