modelgen

The modelgen step transforms the intermediate XML representation into the final Java code, deployment support artefacts, web service support artefacts and a set of Data Definition XML files.

Data Definition XML Files

The Data Definition XML files are placed in the build/svr/gen/ddl directory and are typically made up of a number of files:

The first five of these files contain database independent definitions for creating tables on the database and placing constraints on these tables. <SERVER_MODEL_NAME>_Batch.xml describes the persistent data that is necessary to support the batch process related information that has been captured in the UML model. <SERVER_MODEL_NAME>_fid.xml describes the persistent data that is necessary to support the security related information that has been captured in the UML model. <SERVER_MODEL_NAME>_FieldsReturned.xml describes the persistent data that is necessary to support Field Level Security. <SERVER_MODEL_NAME>_SQLJ.xml contains a representation of all the hand-crafted SQL in the model and is used by the checksql target. More information on the contents of these files is provided in Data Manager.

Foreign Keys and Cúram: The Cúram application is responsible for enforcing referential integrity and foreign keys are generated to support testing of this. The use of declarative referential integrity (foreign keys) in a production system will impact the performance of that system and is consequently not supported.

Java Code

A large number of Java code artefacts are generated as part of this model generation build. They are generated according into a number of categories (and are all located under the /build/svr/gen/<ProjectPackage>/ and /build/svr/gen/<ProjectPackage>/<CodePackage> directories). A CodePackage may be empty or there may be a number of CodePackage elements within each other (for example, <ProjectPackage>/intf and <ProjectPackage>/<CodePackageA>/<CodePackageB>/intf may both be generated depending on the options that have been chosen).

Deployment Artefacts

A number of deployment artefacts are also generated by the model build. This section does not attempt to detail the meaning of these files but simply introduces the files and their locations. These artefacts are used when building an application .ear file where they are passed into the XDoclet tool. They are generated according to the following categories:

Web Service Artefacts

Finally a number of Web Service artefacts are generated. This section does not attempt to detail the meaning of these files but simply introduces the files and their locations. These artefacts are used when building an .ear file that supports Web Service invocation. The artefacts consist of special structs which contain web service conversion routines and a web service configuration file (server-config.wsdd) and are generated into the /build/svr/gen/webservices directory.