Skip to content

Latest commit

 

History

History
77 lines (55 loc) · 2.61 KB

Creating_an_XML_Descriptor_(ELUG).adoc

File metadata and controls

77 lines (55 loc) · 2.61 KB

Image:Elug draft icon.png For the latest EclipseLink documentation, please see http://www.eclipse.org/eclipselink/documentation/


TOC Special:Whatlinkshere_Creating_an_XML_Descriptor_(ELUG)[Related Topics]

This section explains how to create descriptor options specific to an XML descriptor.

For information on how to create more than one type of descriptor, see Creating a Descriptor.

After you create a descriptor, you must configure its various options (see Configuring a Descriptor) and use it to define mappings.

For complete information on the various types of mapping that EclipseLink supports, see Introduction to Mappings and Creating a Mapping.

For complete information on the various types of descriptor that EclipseLink supports, see Descriptor Types.

For more information, see the following:

Creating an XML Descriptor

You can create an XML descriptor using the Workbench or Java code. We recommend that you use the Workbench to create and manage your XML descriptors.

How to Create an XML Descriptor Using Workbench

XML descriptor icon When you add a class to an XML project (see Configuring Project Classpath), Workbench creates an XML descriptor for the class.

An XML descriptor is always a composite type.

How to Create an XML Descriptor Using Java

This example shows how to create an XML descriptor using Java code.

[Example 56-1]# Creating an XML Descriptor in Java

XMLDescriptor descriptor = new XMLDescriptor(); descriptor.setJavaClass(YourClass.class);

Note: Use the org.eclipse.persistence.ox.XMLDescriptor class. Do not use the deprecated org.eclipse.persistence.internal.xml\'\'.\'\'XMLDescriptor class.


Category:_EclipseLink_User’s_Guide[Category: EclipseLink User’s Guide] Category:_Release_1[Category: Release 1] Category:_Task[Category: Task] Category:_XML[Category: XML]