< Previous | Next >

Lesson 2: Adding support for pureQuery to the pureQuery_test Java project

You must configure your Java projects to support the development of applications that use the pureQuery API. You can add this support explicitly or you can add it implicitly when you first generate code from a database object or SQL statement. This lesson describes how to add this support explicitly.

When you configure your project, you can associate your project with the GSDB database. This association enables pureQuery to provide you with assistance when you write or edit SQL statements. You will edit SQL statements in another lesson.

Another reason for adding pureQuery support to your project is to place the pureQuery JAR files in the build path for your application.

To add support for pureQuery to your Java project:

  1. Right-click the pureQuery_test project folder and select pureQuery > Add pureQuery Support. The pureQuery option is near the bottom of the pop-up menu.
  2. In the Add pureQuery Support wizard, select the GSDB connection from the Select Connection page, then click Next.
  3. On the Add pureQuery Support page, accept the defaults and click Finish.
When the Add pureQuery Support window closes, you see the following changes in the Java perspective:
Changes to the project
Changes in the Package Explorer view that appear after support for pureQuery is enabled
  • Your project now contains a list of referenced libraries. These libraries are the JAR files for pureQuery and for the IBM® Data Server Driver for JDBC and SQLJ.
  • Your project also contains a folder named pureQueryFolder. This is not the folder in which pureQuery creates the code that it generates for you. Instead, this folder contains two files that you can use when you are developing pureQuery applications. You will learn more about these files in a later lesson.
Changes to the views
Additional views that appear after support for pureQuery is enabled
Data Source Explorer
The Data Source Explorer is open. You can connect to the GSDB database and generate code from the INVENTORY_LEVELS table, which you will do in the next lesson.
Properties view
The Properties view appears next to the Data Source Explorer. When you write SQL statements, you can quickly refer to the properties of the objects that those statements refer to.
SQL Outline view
The SQL Outline view appears next to the Properties view. You will learn more about this view in a later lesson.
< Previous | Next >

Feedback