Skip Headers
Oracle TopLink Developer's Guide
10g Release 3 (10.1.3)
B13593-01
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

Exporting Project Information

To use your project with the TopLink Foundation Library at run time, you must either generate deployment XML or export the project to Java source code.

For all project types, TopLink Workbench can generate and export the following project information:


Note:

When exporting Java source and deployment XML, TopLink Workbench writes the database password (if applicable) using Java Cryptography Extension (JCE) encryption (when using JDK 1.4). For information on how to specify password encryption options, see "Configuring Password Encryption".

Refer to Oracle TopLink Getting Started Guide for information on using password encryption with JDK 1.3 and earlier.


For relational projects only, TopLink Workbench can also generate and export the following project information:

Exporting Deployment XML Information

To export your deployment XML file (project.xml), use this procedure (see Chapter 8, "Creating TopLink Files for Deployment" for detailed information):

  1. Export Deployment XML button.
    Select the project and click Export Deployment XML.

    You can also right-click the project in the Navigator and choose Export > Project Deployment XML from the context menu or choose Selected > Export > Project Deployment XML from the menu.

    If you have not defined deployment and source code generation defaults (see Chapter 22, "Configuring a Project") TopLink Workbench prompts for a file name and directory.


Note:

If your project contains errors, the project.xml may not be valid. See Chapter 14, "TopLink Workbench Error Reference" for information on each reported error.

To generate the deployment XML file that is compatible with projects prior to 10g Release 3 (10.1.3), see "Configuring Deprecated Direct Mappings" .

Exporting Model Java Source

To generate the project model's Java source code, use this procedure:

  1. Right-click the project, package, or specific descriptor in the Navigator and choose Export > Export Model Java Source from the context menu. TopLink Workbench creates a .java file for each selected descriptor.

    You can also choose Workbench > Export > Export Model Java Source or Selected > Export > Model Java Source from the menu or click Generate Source Code on the Class tab. See "Configuring Class Information" for more information.

If you have not defined deployment and source code generation defaults (see "Configuring a Project") TopLink Workbench prompts for a root directory.


Note:

If your TopLink Workbench project uses UTF-8 character set, you must use a compatible JDK when compiling the exported Java source.

Exporting Project Java Source

For relational projects only, you can convert the project to Java source code. Generally, the generated code executes faster and deploys easier than XML files. See "Generating Java Code for Descriptors" to export the model source for a specific descriptor in a project. To convert your relational project to Java source, use this procedure:

  1. Right-click the project in the Navigator and choose Export > Project Java Source from the context menu.

    Export to Java Source button.
    You can also choose Workbench > Export > Export Java Source or Selected > Export > Project Java Source from the menu.

    If you have not defined deployment and source code generation defaults (see "Configuring a Project") TopLink Workbench prompts for a project class name and directory.


Note:

If your TopLink Workbench project uses the UTF-8 character set, you must use a compatible JDK when compiling the exported Java source.

If your project contains errors, the project.xml file may not be valid. See Chapter 14, "TopLink Workbench Error Reference" for information on each reported error.


To generate Java source that is compatible with projects prior to 10g Release 3 (10.1.3), see "Configuring Deprecated Direct Mappings" .

Exporting Table Creator Files

For relational projects only, you can create Java source code to generate database tables defined in the project using this procedure:

  1. Right-click the project in the Navigator and choose Export > Table Creator Java Source from the context menu.

    You can also choose Workbench > Export > Table Creator Java Source or Selected > Export > Table Creator Java Source from the menu.

If you have not defined deployment and source code generation defaults (see Chapter 22, "Configuring a Project") TopLink Workbench prompts for a class name and root directory.