|Getting Started with Pivotal GemFire / QuickStart Examples|
With OQL querying, you can combine data from multiple regions and drill down into nested region objects, extracting only the data points you need.
OQL is similar to SQL but it works with objects. You can also use indexing to optimize your query performance.
This example creates an example region with data and then runs a handful of queries against it. The first query selects everything from the region so you can see all data the queries are run against.
In a single session, run the example:
$ java quickstart.Querying
Program and cache configuration source files:
|Querying.xml||Initializes a region with sample Portfolio data for querying.|
|Querying.java||Demonstrates querying on a set of data in a region.|
|Portfolio.java||A stock portfolio that consists of multiple Position objects that represent shares of a stock.|
|Position.java||Represents shares of stock held in a portfolio.|