16.10.2015 Views

Getting Startedwith pureQuery

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

262<br />

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

the database. You can specify a RowHandler implementation to<br />

customize how <strong>pureQuery</strong> updates the properties in the bean.<br />

• com.ibm.pdq.runtime.handlers.ResultHandler: You can<br />

use a ResultHandler to determine how <strong>pureQuery</strong> returns the<br />

entire query result. Like the RowHandler interface, the<br />

ResultHandler interface defines a method named handle.<br />

<strong>pureQuery</strong> calls this method to process the entire query result, and the<br />

annotated or inline method returns the object of type RES that the handle<br />

method returns.<br />

• com.ibm.pdq.runtime.handlers.CallHandlerWithParameters<br />

: If your SQL is a stored procedure call, you can use a<br />

CallHandlerWithParameters object to determine how<br />

<strong>pureQuery</strong> returns the results of the stored procedure. The<br />

CallHandlerWithParameters method defines a method<br />

named handleCall. <strong>pureQuery</strong> calls this method to process the results<br />

of the stored procedure call, including query results and OUT and INOUT<br />

parameters. The annotated or inline method returns the object of type<br />

CAL that is returned by this method.

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

Saved successfully!

Ooh no, something went wrong!