Chapter 6 Finding Your Data "If you can find a path with no obstacles, it probably doesn't lead anywhere." Frank A Clark The capability to transparently persist object instances directly is a powerful feature; however, it would be incomplete without a mechanism to query and retrieve the information stored in those persistent instances The JDO specification include a query facility, pieces of which have already been introduced and used in previous chapters The query facility consists of two partsthe API that can be used in application code to programmatically locate the information and a query language called JDO Query Language (JDOQL) that defines the grammar associated with structuring the queries This concept is analogous to how the traditional relational database persistence works in Java There is an API called JDBC that specifies the programmatic contract and the query language (SQL) that defines the grammar In this chapter, we look at the query API that the JDO provides as a part of the javax.jdo package, and we also look at JDOQL, its syntax, and how it can be used for specifying meaningful queries