Skip to main content

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.

Jump to: navigation, search

EclipseLink/Examples/SDO/DynamicAPI

< EclipseLink‎ | Examples‎ | SDO
Revision as of 16:37, 24 February 2009 by Unnamed Poltroon (Talk) (Creating DataObjects)

Creating DataObjects

Using DataFactory

DataObjects can be created by Type using DataFactory:

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

Using DataObject

Once you have a DataObject you can use it to create child DataObjects based on its properties:

DataObject contactInfoDO = customerDO.createDataObject("contact-info");
DataObject billingAddressDO = contactInfoDO.createDataObject("billing-address");

Copyright © Eclipse Foundation, Inc. All Rights Reserved.