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.

Chapter 3 – Code generation and customized Java Editor Integration 69<br />

Figure 3.4 - Database to Java type mapping for <strong>pureQuery</strong> beans<br />

Depending on your selection, the <strong>pureQuery</strong> tooling can generate some sample statements<br />

to retrieve, insert, update, delete and merge data from your table. When generating these<br />

statements, the <strong>pureQuery</strong> tooling uses the primary keys definition on your table to<br />

construct the WHERE clause of you SQL statements where applicable. You can choose to<br />

either use “*” or to list all columns explicitly for the SELECT statements as shown in Figure<br />

3.5. After clicking Finish the wizard will generate the code for you. You can easily<br />

customize this code to your needs by modifying the SQL statements generated, adding<br />

new and modifying existing methods and corresponding SQL to you <strong>pureQuery</strong> interface. If<br />

using annotated-method style, the implementation to the <strong>pureQuery</strong> interface will<br />

automatically be re-generated by the <strong>pureQuery</strong> generator if you have the Build<br />

Automatically setting checked under the Project menu.

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

Saved successfully!

Ooh no, something went wrong!