|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface QueryBase
Provides the parent interface for the query sub-interfaces, Query and CombinedQuery.
CombinedQuery is used to represent a combination of queries.
Query is used to represent a simple query.
A QuerySpecification instance contains an instance of QueryBase.
A CombinedQuery instance contains an array of QueryBase instances.
This allows you to use the sub-classes of this class to specify your main query and add queries to the combined queries it contains.
Example: Constructing a simple query with only query result objects.
Note: This example assumes that you have obtained a DataSourceSpecification instance.
Additionally, it assumes that you have found query result objects in the Universe and have stored their keys in
lists called dimensionKeys, detailKeys, and measureKeys.
QuerySpecification boQuerySpec = QuerySpecification.Factory.newInstance();
// Create a Query array. We are only using a single query in this example, so the array is of size 1.
Query boQuery = Query.Factory.newInstance();
// The query will contain three result objects (these objects represent the fields that are contained in the query result).
//Create an array of QueryObject objects to store the result objects. You can use Detail, Dimension, or Measure objects as result objects.
QueryObject[] boQueryResultObjects = new QueryObject[3];
boQueryResultObjects[0] = QueryObject.Factory.newInstance();
boQueryResultObjects[1] = QueryObject.Factory.newInstance();
boQueryResultObjects[2] = QueryObject.Factory.newInstance();
boQueryResultObjects[0].setKey((String)detailKeys.get(1));
boQueryResultObjects[1].setKey((String)dimensionKeys.get(0));
boQueryResultObjects[2].setKey((String)measureKeys.get(0));
boQuery.setQueryResultArray(boQueryResultObjects);
// Add the query to the QuerySpecification
boQuerySpec.setQueryBase(boQuery);
QuerySpecification,
CombinedQuery,
Query,
QueryObject| Nested Class Summary | |
|---|---|
static class |
QueryBase.Factory
A class with methods for creating instances of the QueryBase type. |
| Field Summary | |
|---|---|
static org.apache.xmlbeans.SchemaType |
type
Internal Use Only. |
| Method Summary | |
|---|---|
java.lang.String |
getID()
Gets the ID of this QueryBase instance. |
boolean |
isSetID()
Checks if the ID attribute has been set. |
void |
setID(java.lang.String id)
Internal Use Only. |
void |
unsetID()
Internal Use Only. |
org.apache.xmlbeans.XmlString |
xgetID()
Internal Use Only. |
void |
xsetID(org.apache.xmlbeans.XmlString id)
Internal Use Only. |
| Field Detail |
|---|
static final org.apache.xmlbeans.SchemaType type
Internal Use Only.
| Method Detail |
|---|
java.lang.String getID()
Gets the ID of this QueryBase instance.
QueryBase instanceorg.apache.xmlbeans.XmlString xgetID()
Internal Use Only.
boolean isSetID()
true if the ID of the QueryBase is set, otherwise falsevoid setID(java.lang.String id)
Internal Use Only.
void xsetID(org.apache.xmlbeans.XmlString id)
Internal Use Only.
void unsetID()
Internal Use Only.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||