Chapter 4. Starting dods generator

Table of Contents

File location
Quick Compile
Custom Compile
Advanced Custom Compile
Structure
Tag reference
Sample of part of transient XML file

There are two different ways to run dods generator. If you want to start generator quickly, you can start wizard by typing

dods (for Windows)

or

./dods (for Linux)

without any parameter. Those files are located in

This will be described in the section "Quick Compile" of this chapter.

If you want to start generator without wizard, you need to type (in the command line) dods with additional parameters. You can find details in the section "Custom Compile" of this chapter.

File location

After generating, locations of generated files are:

<OUTPUT_DIRECTORY>\SQLcreate.sql
<OUTPUT_DIRECTORY>\<PACKAGE_0>\..\<PACKAGE_N>\<TableName>DataStruct.java
<OUTPUT_DIRECTORY>\<PACKAGE_0>\..\<PACKAGE_N>\<TableName>DataStruct.java
<OUTPUT_DIRECTORY>\<PACKAGE_0>\..\<PACKAGE_N>\<TableName>DOI.java
<OUTPUT_DIRECTORY>\<PACKAGE_0>\..\<PACKAGE_N>\<TableName>DO.java
<OUTPUT_DIRECTORY>\<PACKAGE_0>\..\<PACKAGE_N>\<TableName>Query.java
<OUTPUT_DIRECTORY>\<PACKAGE_0>\..\<PACKAGE_N>\<TableName>.xml

where <OUTPUT_DIRECTORY> is base directory of your project, <PACKAGE_0>\..\<PACKAGE_N> is generated from last package id attribute of DOML file, and <TableName> is the name of the table from your database. For example, if part of your DOML file looks like this:

<package id="discRack"> 
  <package id="discRack.data"> 
    <table id="discRack.data.Person" dbTableName="Person"> 
        ... 
    </table> 

you will get file structure as follows:

<OUTPUT_DIRECTORY>\discRack\data\PersonDataStruct.java 
<OUTPUT_DIRECTORY>\discRack\data\PersonDOI.java 
<OUTPUT_DIRECTORY>\discRack\data\PersonDO.java 
<OUTPUT_DIRECTORY>\discRack\data\PersonQuery.java 
<OUTPUT_DIRECTORY>\discRack\data\Person.xml 

There are transient XML files that are generated from DOML file, before Java code is generated. The java code, mentioned before, is actually generated from those transient xml files. If you want, you can change these xml files instead of DOML file and generate Java code directly, without using the DOML file. You can find instructions for this in Advanced Custom Compile section.

If you change the DOML file, all java classes will be generated again, but, if you change transient xml files instead of the DOML file, only changed xml files are generated in java files. Other java files (whose xml files are not changed) are left as they are.