Jump to: navigation, search

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

(New page: ==Overview== The following example will demonstrate how to use EclipseLink's SDO functionality to: * Generate Java source files from an XML Schema using the SDO Compiler ==Setup== # Ens...)
 
m
 
Line 11: Line 11:
  
 
The SDO compiler can be run to generate Static SDO Java files from an XML Schema:
 
The SDO compiler can be run to generate Static SDO Java files from an XML Schema:
<pre>
+
<source lang="text">
 
<ECLIPSELINK_HOME>/eclipselink/bin/sdo-compiler.sh [-options]
 
<ECLIPSELINK_HOME>/eclipselink/bin/sdo-compiler.sh [-options]
 
<ECLIPSELINK_HOME>\eclipselink\bin\sdo-compiler.cmd [-options]
 
<ECLIPSELINK_HOME>\eclipselink\bin\sdo-compiler.cmd [-options]
Line 23: Line 23:
 
Example:
 
Example:
 
   sdo-compiler.sh -sourceFile config/Customer.xsd -targetDirectory sdo-compiler-output -logLevel 8
 
   sdo-compiler.sh -sourceFile config/Customer.xsd -targetDirectory sdo-compiler-output -logLevel 8
</pre>
+
</source>
  
 
For each complex type in the schema, the compiler will generate both an interface (e.g. <tt>CustomerType.java</tt>), and a concrete implementation which subclasses <tt>org.eclipse.persistence.sdo.SDODataObject</tt> (e.g. <tt>CustomerTypeImpl.java</tt>).
 
For each complex type in the schema, the compiler will generate both an interface (e.g. <tt>CustomerType.java</tt>), and a concrete implementation which subclasses <tt>org.eclipse.persistence.sdo.SDODataObject</tt> (e.g. <tt>CustomerTypeImpl.java</tt>).

Latest revision as of 10:25, 24 February 2009

Overview

The following example will demonstrate how to use EclipseLink's SDO functionality to:

  • Generate Java source files from an XML Schema using the SDO Compiler

Setup

  1. Ensure that you have EclipseLink correctly installed and configured for your environment. Please see EclipseLink/Installing and Configuring EclipseLink for more information.

Running the SDO Compiler

The SDO compiler can be run to generate Static SDO Java files from an XML Schema:

<ECLIPSELINK_HOME>/eclipselink/bin/sdo-compiler.sh [-options]
<ECLIPSELINK_HOME>\eclipselink\bin\sdo-compiler.cmd [-options]
 
Options:
   -help                        Prints the help message text
   -sourceFile <filename>       The input schema file (required)
   -targetDirectory <dirname>   The directory to generate Java source (optional)
   -logLevel <level>            Specify the integer value of the logging level
                                (8=OFF,7=SEVERE,6=WARNING,5=INFO,4=CONFIG,3=FINE,2=FINER(default),1=FINEST,0=ALL)
Example:
   sdo-compiler.sh -sourceFile config/Customer.xsd -targetDirectory sdo-compiler-output -logLevel 8

For each complex type in the schema, the compiler will generate both an interface (e.g. CustomerType.java), and a concrete implementation which subclasses org.eclipse.persistence.sdo.SDODataObject (e.g. CustomerTypeImpl.java).