16.10.2015 Views

Getting Startedwith pureQuery

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

232<br />

<strong>Getting</strong> Started with <strong>pureQuery</strong><br />

To use the <strong>pureQuery</strong> tools to generate the XML file, a subset of the XML JPA<br />

specification, Open the <strong>pureQuery</strong> interface class, right-click on the interface and select<br />

<strong>pureQuery</strong>Generate XML.<br />

11.7.2 EMFT JET template customization for code generation<br />

To generate code, the tooling uses Eclipse Modeling Framework Technologies(EMFT )<br />

Java Emitter Templates (JET) templates. In order to generate your own customized code,<br />

you must override the default JET transformation by creating an EMFT JET project,<br />

creating the templates, and telling ODS to use your own transformations. The many<br />

different JET templates used by the <strong>pureQuery</strong> tooling are located in the<br />

com.ibm.datatools.javatool.transform.codegen plugin within ODS. For<br />

detailed information on creating the project, templates and overriding the default<br />

transformation refer to the ODS documentation for Creating Eclipse Modeling Framework<br />

Technologies (EMFT) Java Emitter Templates (JET) to generate customized code.<br />

The supported databases for code generation from templates are DB2 LUW, DB2 for z/OS,<br />

IDS, DB2 iSeries and Oracle.<br />

The following table lists some of the templates for code generation that are in the plugin:<br />

Name of template Supported DBMS Description<br />

GenTableBean.jet<br />

GenTableInlineJUnit<br />

GenTableInlineSample.jet<br />

GenTableInterface.jet<br />

DB2 LUW, DB2 for<br />

z/OS, IDS, Oracle<br />

DB2 LUW, DB2 for<br />

z/OS, IDS, Oracle<br />

DB2 LUW, DB2 for<br />

z/OS, IDS, Oracle<br />

DB2 LUW, DB2 for<br />

z/OS, IDS, Oracle<br />

Generates a bean that contains<br />

properties of columns of a table<br />

or view.<br />

Generates a JUnit test case that<br />

contains inline methods for<br />

accessing the corresponding<br />

database object.<br />

Generates a Java test class that<br />

contains inline methods for<br />

accessing the corresponding<br />

database object.<br />

Generates a Java interface that<br />

contains annotates methods for<br />

accessing the corresponding<br />

database object.<br />

GenTableInterfaceJUnit.jet DB2 LUW, DB2 for Generates a JUnit test case for

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!