Getting Startedwith pureQuery
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
7.2.2.3 Changes to <strong>pureQuery</strong>Xml files<br />
Chapter 8 – Extended Insight 141<br />
If you are using the StaticBinder to bind the statements in a <strong>pureQuery</strong>Xml file that you<br />
created by using the capture functionality of the Client Optimizer, you must use the<br />
Configure utility to process the file before you use the file with the StaticBinder utility. You<br />
must do so anytime you alter the file, either by performing an incremental capture or by<br />
editing it manually. If you do not process the file with the Configure utility, your application<br />
could have unexpected results during static execution. If you are using a <strong>pureQuery</strong>enabled<br />
file in IBM Optim Development Studio, the tool runs the Configure utility for the<br />
<strong>pureQuery</strong>Xml files in the <strong>pureQuery</strong>Folder directory automatically.<br />
Tools that integrate with <strong>pureQuery</strong> have <strong>pureQuery</strong>Xml files that are created without using<br />
the <strong>pureQuery</strong> capture capability. These tools are .NET, CLI, JPA, and Hibernate. Chapter<br />
17 discusses the integration with JPA. The integration with .NET and CLI is beyond the<br />
scope of this book. As with files created using <strong>pureQuery</strong> capture, you must use the<br />
Configure utility to process <strong>pureQuery</strong>Xml files for .NET and CLI after the files are created<br />
or altered. The files that are created for integration with JPA and Hibernate do not need to<br />
be configured, and the Configure utility cannot process them.<br />
IBM recommends that you only modify <strong>pureQuery</strong>Xml files by using tools provided by IBM.<br />
These include capturing, configuring, and using the IBM Optim Development Studio<br />
<strong>pureQuery</strong>XML editor. If you modify <strong>pureQuery</strong>Xml files manually, they could contain an<br />
unexpected or invalid combination of values. The Configure utility can correct or identify<br />
some of the problems that manual editing can cause. Therefore, IBM particularly<br />
recommends that you do not manually edit the <strong>pureQuery</strong>Xml files that are created for JPA<br />
and Hibernate.<br />
7.3 Specifying options for the StaticBinder utility<br />
<strong>pureQuery</strong> provides multiple utilities. All of these utilities allow you to specify options on<br />
the command line. For the StaticBinder utility and some of the other utilities, you can<br />
specify the interfaces and <strong>pureQuery</strong>Xml files that you want the utility to use, along with the<br />
options it should use for each interface or file, in a type of file that is known as an options<br />
file. Refer to Appendix D for a description of options files. <strong>pureQuery</strong> allows two types of<br />
options files: genProps and bindProps. The StaticBinder utility uses bindProps files.<br />
An options file is a text file that lists interfaces and <strong>pureQuery</strong>Xml files to be processed,<br />
and the options to apply to each interface or file. For <strong>pureQuery</strong>Xml files, you can use a<br />
colon and the name (:MYPKGA, for example) of a statement set to indicate that the options<br />
on the line apply to only the specified statement set. Each interface and <strong>pureQuery</strong>Xml file<br />
must be listed on a separate line in the options file, followed by an equal sign (=), and then<br />
any options that <strong>pureQuery</strong> should use when it processes that item. Additionally, in each<br />
options file, you can provide default options on a line that starts with defaultOptions.<br />
<strong>pureQuery</strong> uses each option that you specify on the defaultOptions line for all the<br />
items, except for those items for which the option is specified with a different value. Listing