A query is a collection of Selection
objects and a layout that specifies the ordering and structure of the dimensions that the selections represent. Each selection object specifies the criteria for a set of members for a particular dimension, such as Product or Geography.
For example, a query might specify the top 10 products based on Sales for January 2002 in the Eastern region.
Queries are created in these ways:
By using the QueryBuilder bean to generate a query.
By creating a Query
object and its
objects programmatically. Selection
Note: The Presentation wizard and the Query wizard in JDeveloper display many of the QueryBuilder panels as they assist users in creating queries.
A query that has been created in the QueryBuilder bean is converted into data as follows:
The QueryBuilder bean passes the Selection
objects that comprise the query to its associated Query
object.
The Query
object converts each Selection
object into an OLAP API query by evaluating, in order, each step in the series of steps.
If any sort specifications exist, then the Query
object applies the sort specifications (such as, "sort alphabetically") to its selections.
The OLAP API query is then run to obtain the results.
The Query
object passes the results to the view (namely, a crosstab, graph, or table) that it is associated with or to the QueryBuilder bean. You can use the Selected Members tab in the QueryBuilder to view the results of steps for a given dimension in the query.
Creating Selections Programmatically
Defining a Query Programmatically
Defining a Query Using QueryBuilder
Saving Favorites in QueryBuilder