
Chapter 12. Custom Queries 235
Test the Fixed Custom Query
In our test sample (Figure 157), we will demonstrate the code used to call a
custom query on a home collection. As always, we begin by activating the
datastore, begin a transaction, then commit the transaction when complete.
To invoke the query, we use the retrieval method on a home collection. The
result of our query is a Vector that we have simply displayed to the console.
Figure 157. Scrapbook: Custom Query Gold Accounts (GoldAccounts.scrap)
Example of a Variable Custom Query
The second sample shows a more advanced custom query with two input
parameters and a join in the query’s where clause. ...