Generating J2SE code

Step 1: General Settings

To generate code for Java 2 Standard Edition, choose the "Generate J2SE DAO Tier" menu option under the "Generate" menu. You are presented with the following dialog:

Java Generation

Application Name

The application name is used within the generated build script to determine the name of the JAR file to create. The application name has no impact on the generated Java code.

Package Name

Enter the package name that you wish to use for the generated code. Multiple packages are created within this package. For example, choosing the default package name of com.mycompany.myapp results in the following packages being generated:

com.mycompany.myapp.dao
com.mycompany.myapp.dto
com.mycompany.myapp.exception
com.mycompany.myapp.factory
com.mycompany.myapp.jdbc

Output Directory

It is recommended that you choose an output directory that is separate from other source code in your Java project. For example, if your hand-written code is under a "src" directory, it is recommended that you generate your DAO code to a "dao" directory at the same level as the "src" directory.

Delete Files

It is recommended that the "delete files" options remains checked. This will cause FireStorm/DAO™ to delete files in the output directory before generating code and therefore ensures a clean build each time. FireStorm/DAO™ will not CVS or Subversion version control files (FireStorm/DAO™ will not delete folders named "CVS" or ".svn", or files named ".cvsignore".

Logging

FireStorm/DAO™ supports three options for generating logging code: log4, stdout, and none.


Step 2: Choose Persistence Strategy

Choose between JDBC and Java Data Objects for the generated DAO implementation.

JDBC Selection


Step 3: JDBC Connection Settings

Enter the JDBC connection details to use at runtime. If the schema was imported from JDBC then this screen will be populated already. These values will be written to a ResourceManager.java source file for development use. However, you should replace ResourceManager with your own class for production use.

Java Generation


Return to Tutorial Index