|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface QueryObject
Represents a query result, or query scope object in the Universe (data source).
This interface stores a reference to an object in the Universe. By adding a QueryObject
instance to a Query, you specify that the object in the Universe represented by
the QueryObject is part of the query.
For example, to add a DataSourceObject (obtained from a Universe DataSourceSpecification)
to the result of a query, you create a QueryObject instance and set the key of the QueryObject
instance to the key of the DataSourceObject. You then add the QueryObject instance to the
QueryObject array in the Query instance.
Example: Adding query result objects to a QuerySpecification
Note: It is assumed that you have found query result, query condition and
query scope objects in the Universe (data source) and have stored their keys
in lists called: detailKeys, dimensionKeys,
measureKeys, and preConditionObjectKeys.
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);
Adding query scope objects to a query is similar to adding query result objects to a query. The difference is that
you use the DataSourceObject instances obtained from a Hierarchy instead of those
obtained from a DataSourceClass. See Hierarchy for
further information about how to add query scope objects to a query.
In addition to adding query result and query scope objects to a query, you can also add query conditions to
a query. See QueryCondition for information
about how to add a custom query condition to a query. See PreCondition for information about how to add a PreConditionObject found in a Universe
to a query.
| Nested Class Summary | |
|---|---|
static class |
QueryObject.Factory
A class with methods for creating instances of the QueryObject type. |
| Field Summary | |
|---|---|
static org.apache.xmlbeans.SchemaType |
type
Internal Use Only. |
| Method Summary | |
|---|---|
java.lang.String |
getKey()
Gets the key stored in the QueryObject instance. |
java.lang.String |
getName()
Gets the name stored in the QueryObject instance. |
boolean |
isNilName()
Checks if the Name element has been set to nil. |
boolean |
isSetName()
Checks if the Name element has been set. |
void |
setKey(java.lang.String key)
Sets the key stored in the QueryObject instance. |
void |
setName(java.lang.String name)
Sets the name stored in the QueryObject instance. |
void |
setNilName()
Nils the Name element. |
void |
unsetName()
Deletes or unsets the Name element. |
org.apache.xmlbeans.XmlString |
xgetKey()
Internal Use Only. |
org.apache.xmlbeans.XmlString |
xgetName()
Internal Use Only. |
void |
xsetKey(org.apache.xmlbeans.XmlString key)
Internal Use Only. |
void |
xsetName(org.apache.xmlbeans.XmlString name)
Internal Use Only. |
| Field Detail |
|---|
static final org.apache.xmlbeans.SchemaType type
Internal Use Only.
| Method Detail |
|---|
java.lang.String getName()
Gets the name stored in the QueryObject instance.
QueryObject instance.org.apache.xmlbeans.XmlString xgetName()
Internal Use Only.
boolean isNilName()
true if the Name element is nil, otherwise falseboolean isSetName()
true if the Name element is set, otherwise falsevoid setName(java.lang.String name)
Sets the name stored in the QueryObject instance. Normally, you would set this
to the name of the data source object represented by this QueryObject instance.
name - the name stored in the QueryObject instancevoid xsetName(org.apache.xmlbeans.XmlString name)
Internal Use Only.
void setNilName()
void unsetName()
java.lang.String getKey()
Gets the key stored in the QueryObject instance. The key should be
set to the key of a data source object from the Universe (data source).
QueryObjectorg.apache.xmlbeans.XmlString xgetKey()
Internal Use Only.
void setKey(java.lang.String key)
Sets the key stored in the QueryObject instance. The key should be
set to the key of a data source object from the Universe (data source).
key - the key of a data source object to be represented by this QueryObjectvoid xsetKey(org.apache.xmlbeans.XmlString key)
Internal Use Only.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||