Oracle™ Business Intelligence Beans Java API Reference
Release 10
g (9.0.4)
Part number B12159_01


oracle.dss.dataSource
Class QueryServer

java.lang.Object
  |
  +--oracle.dss.dataSource.common.Query
        |
        +--oracle.dss.dataSource.QueryServer
All Implemented Interfaces:
BaseManager, CheckpointState, DataSource, DrillConstants, DrillManager, java.util.EventListener, javax.infobus.InfoBusDataProducer, javax.infobus.InfoBusEventListener, javax.infobus.InfoBusMember, LayoutContext, LayoutManager, MainManager, Persistable, java.beans.PropertyChangeListener, QueryContext, SelectionManager, java.io.Serializable, StringXMLizable, ThinBean

public class QueryServer
extends Query
implements MainManager, DrillManager, LayoutManager, SelectionManager, java.io.Serializable, DrillConstants

Implements the DataSource API from the server perspective. This object contains the real working implementations of the API

See Also:
Serialized Form

Fields inherited from class oracle.dss.dataSource.common.Query
NO_EVALUATE_ON_LOAD, QUERY_MANAGER

 

Fields inherited from interface oracle.dss.dataSource.common.DrillConstants
DRILL_EXCLUDE_RANGE, DRILL_EXCLUDE_SELF, DRILL_EXCLUDE_SIBLINGS

 

Constructor Summary
QueryServer()
          Construct a QueryServer object
QueryServer(QueryManagerServer qm)
          Construct a QueryServer object

 

Method Summary
 void addCubeMeasures(java.lang.String[] measures)
          Add one or more measures to an existing query.
 void applyDataMap(DataMap map)
          Request that the specified data layers be added to the underlying query These data layers will be included in subsequent cursors.
 void applyMetadataMap(int edge, MetadataMap map)
          Request that the specified metadatadata layers be added to the underlying query These metadata layers will be included in subsequent cursors.
 void applyMetadataMap(java.lang.String dimension, MetadataMap map)
          Request that the specified metadatadata layers be added to the underlying query These metadata layers will be included in subsequent cursors.
 void applySelection(Selection selection)
          Apply the given Selection object to the corresponding Selection object in the Query.
 void applySelections(Selection[] sels)
          Apply the given selections to the corresponding Selection objects in the Query.
 void checkpointState()
          Tells the ThinBean to start tracking state changes.
 java.lang.Object clone()
          Clone this QueryManager
 java.lang.Object clone(boolean evaluateCursor)
          Clone this QueryServer
 boolean commit()
           
 void drill(java.lang.String dimension, java.lang.String value, java.lang.String hierarchy, int delta, java.lang.String valueParent, java.lang.String queryParent)
          Drills to a relative level of the specified hierarchy accepting value's parent for optimization of drill steps later.
 void drill(java.lang.String dimension, java.lang.String value, java.lang.String hierarchy, int delta, java.lang.String valueParent, java.lang.String queryParent, int levelDepth, OlapQDR parentQDR)
          Drills to a relative level of the specified hierarchy accepting a value's parent for optimization of drill steps later.
 void drill(java.lang.String dimension, java.lang.String value, java.lang.String hierarchy, int delta, java.lang.String valueParent, java.lang.String queryParent, OlapQDR parentQDR)
          Drills to a relative level of the specified hierarchy accepting a value's parent for optimization of drill steps later.
 void drill(java.lang.String dimension, java.lang.String value, java.lang.String hierarchy, java.lang.String level, int action, java.util.BitSet flags)
          Drill to specified level of the specified hierarchy.
 com.sun.java.util.collections.List findAllSelections()
          Return a reference to the complete collection of Selection objects for the Query.
 Selection findSelection(com.sun.java.util.collections.List dimensions)
          Retrieves a Selection object that corresponds to the specified dimensions.
 Selection findSelection(java.lang.String dimension)
          Return a Selection object corresponding to the specified dimension.
 CalcStep getCalcStep(MDObject mdObject)
          Retrieves the CalcStep that is associated with the specified MDObject.
 java.lang.String getCheckpointState()
          Used to retrieve the state differences from the last time that state was checkpointed.
 java.lang.String getDatabaseName()
          Return the name of the current database this Query's QueryManager is using.
 java.lang.String[][] getLayout()
          Return the current layout of dimensions in the query as a two-dimensional String Note this method may throw a QueryRuntimeException
 java.lang.String[] getMeasures()
          Return the current set of measuresin the query
 interface getMetadataManager()
          Return the current metadata manager set on this query
 QueryManager getQueryManager()
          Get the QueryManager property value
 QueryState getQueryState()
          Grab a state marker (client side momento) for the current Query state
 java.lang.String getState()
          Returns a String that represents the changes in the ThinBean, since the ThinBean was created or since setBaseState() was called.
 Selection getUniverseSelection(java.lang.String dimension)
          Return the selection object being used as the starting "universe" corresponding to the specified dimension.
 java.lang.Object getXML( retCons)
           
 void initCubeQuery(java.lang.String[] measures, java.lang.String[][] dimensions)
          Create a query based on one or more specified measures.
 void initQuery(java.lang.String[][] dimensions, java.lang.String[] measures)
          Create a query based on the specified dimensions; an optional measure can also be specified.
 java.lang.Boolean isDependentOn(MDObject object)
          Checks a given MDObject (measures are the only type of MDObject checked at this time) and determines if the query makes use of the object in its selections or measure list.
 java.lang.Boolean layout(java.lang.String[][] dimensions)
          Arrange the layout of dimensions along the query's edges.
 void pivot(java.lang.String source, java.lang.String target, int flags)
          Perform the specified pivot operation.
 void refresh(boolean rebuild)
          Refreshes all cursors and/or structures of this Query object.
 void removeCubeMeasures(java.lang.String[] measures)
          Remove one or more measures from an existing query.
 void removeSelection(Selection selection)
          Remove the given Selection object from the Query.
 void setBaseState()
          Establishes a base state for the ThinBean from which state changes that go onto the state string are tracked.
 void setCheckpointState(java.lang.String state)
          Used to set state differences from the last time that state was checkpointed.
 void setDataMap(DataMap map)
          Request that the specified data layers be fetched for all clients and all subsequent cursors.
 void setDefaultLayoutCounts(int numCol, int numRow)
          Set the default layout dimension count properties.
 void setEvaluateCursor(boolean evalCursor)
          Turn off actual cursor evaluation
 void setMetadataMap(java.lang.String dimension, MetadataMap map)
          Request that the specified metadatadata layers be fetched for all clients and all subsequent cursors.
 void setQueryManager(QueryManager qm)
          Set the QueryManager property
 void setQueryState(QueryState state)
          Set the Data Source back to a previously given state.
 void setState(java.lang.String xml)
          Sets a state string that represents the changes on the ThinBean, since the ThinBean was created or since setBaseState() was called.
 void setUniverseSelection(java.lang.String dimension, Selection selection)
          Set a selection object for the starting "universe" corresponding to the specified dimension.
 void setXML( context, java.lang.Object node)
           
 boolean submit(com.sun.java.util.collections.List qdrCollection)
           
 void swap(java.lang.String source, java.lang.String target)
          Perform the specified swap operation.
 void swapEdges(int source, int target)
          Perform the specified edge swap operation.
 boolean updateCustomMeasures( selectionList,  metadataManager)
          Updates the custom measures, if necessary.
 ValidationObject validate(int validationType)
          Validate the entire Query with OLAPI
 ValidationObject validate(int validationType, int edge)
          Validate the an entire edge with OLAPI
 ValidationObject validate(int validationType, Selection selection)
          Validate a Selection with OLAPI
 ValidationObject validate(int validationType, Step step)
          Validate a specific Step with OLAPI

 

Methods inherited from class oracle.dss.dataSource.common.Query
addPropertyChangeListener, addQueryListener, applyLayoutAccess, applyQueryAccess, cancel, close, createCubeDataDirector, createCubeLayoutAccess, createLayoutAccess, createQueryAccess, createRelationalDataDirector, createRelationalLayoutAccess, getCurrentPage, getDataMap, getDefaultColumnCount, getDefaultRowCount, getFetchPageEdge, getFetchSize, getMetadataMap, getMetadataMap, getName, getSuppressColumns, getSuppressionState, getSuppressionState, getSuppressRows, getThinBeanName, isAsymmetricDrilling, isAutoUpdate, isDebugMode, isEvaluateCursor, isHierarchicalDrilling, isPrintQueryState, isSeparatePage, isSharePage, isUpdatePending, isXMLValidated, removePropertyChangeListener, removeQueryListener, setAsymmetricDrilling, setAutoUpdate, setCurrentPage, setCurrentPageAndFireEvent, setDebugMode, setDefaultColumnCount, setDefaultRowCount, setFetchPageEdge, setFetchSize, setHierarchicalDrilling, setMeasures, setName, setPrintQueryState, setSeparatePage, setSharePage, setSuppressColumns, setSuppressionState, setSuppressionState, setSuppressRows, setThinBeanName, setXMLValidated, update

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Methods inherited from interface oracle.dss.dataSource.common.MainManager
getDataMap, getMetadataMap, getMetadataMap

 

Methods inherited from interface oracle.dss.dataSource.common.BaseManager
addQueryListener, cancel, getFetchPageEdge, getFetchSize, getSuppressionState, isAsymmetricDrilling, isAutoUpdate, isEvaluateCursor, isHierarchicalDrilling, isUpdatePending, removeQueryListener, setAsymmetricDrilling, setAutoUpdate, setFetchPageEdge, setFetchSize, setHierarchicalDrilling, setSuppressionState, update

 

Methods inherited from interface javax.infobus.InfoBusMember
addInfoBusPropertyListener, addInfoBusVetoableListener, getInfoBus, removeInfoBusPropertyListener, removeInfoBusVetoableListener, setInfoBus

 

Methods inherited from interface javax.infobus.InfoBusDataProducer
dataItemRequested

 

Methods inherited from interface java.beans.PropertyChangeListener
propertyChange

 

Methods inherited from interface oracle.dss.util.persistence.Persistable
getPersistableAttributes, getPersistableComponents, initialize, setPersistableAttributes, setPersistableComponents

 

Methods inherited from interface oracle.dss.util.persistence.StringXMLizable
getXMLAsString, setXMLAsString

 

Constructor Detail

QueryServer

public QueryServer()
Construct a QueryServer object

QueryServer

public QueryServer(QueryManagerServer qm)
            throws java.lang.Exception
Construct a QueryServer object
Throws:
java.lang.Exception - error encountered bringing back query after persistence
Method Detail

setQueryManager

public void setQueryManager(QueryManager qm)
                     throws java.lang.Exception
Set the QueryManager property
Overrides:
setQueryManager in class Query
Parameters:
qmc - QueryManager instance
Throws:
java.lang.Exception - error encountered bringing back query after persistence

getQueryManager

public QueryManager getQueryManager()
Get the QueryManager property value
Overrides:
getQueryManager in class Query
Returns:
QueryManager value or null

setUniverseSelection

public void setUniverseSelection(java.lang.String dimension,
Selection selection)
                          throws InvalidStepArgException,
MetadataManagerException,
SelectionException,
QueryException
Set a selection object for the starting "universe" corresponding to the specified dimension.
Specified by:
setUniverseSelection in interface SelectionManager
Parameters:
dimension - dimension for which to set the universe
selection - selection to set as the universe
Throws:
InvalidStepArgException - thrown if a step in a selection is bad
SelectionException - thrown if a selection can't be created
QueryException - thrown if there is a problem fetching data after this operation
MetadataManagerException - thrown if an error occurred using the database bean

getUniverseSelection

public Selection getUniverseSelection(java.lang.String dimension)
                               throws IllegalArgException
Return the selection object being used as the starting "universe" corresponding to the specified dimension. null if none.
Specified by:
getUniverseSelection in interface SelectionManager
Parameters:
dimension - for which to return the universe selection
Throws:
IllegalArgException - if arguments are invalid

clone

public java.lang.Object clone(boolean evaluateCursor)
                       throws java.lang.CloneNotSupportedException
Clone this QueryServer
Overrides:
clone in class Query
Parameters:
evaluateCursor - true if this clone should have cursor evaluation turned on
Returns:
a newly-created copy of the Query
Throws:
java.lang.CloneNotSupportedException - thrown if a Query can not be cloned

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clone this QueryManager
Specified by:
clone in interface BaseManager
Overrides:
clone in class Query
Returns:
a newly-created copy of the QueryManager
Throws:
java.lang.CloneNotSupportedException - thrown if a QueryManager can not be cloned

getMetadataManager

public getMetadataManager()
Return the current metadata manager set on this query
Overrides:
getMetadataManager in class Query

drill

public void drill(java.lang.String dimension,
                  java.lang.String value,
                  java.lang.String hierarchy,
                  int delta,
                  java.lang.String valueParent,
                  java.lang.String queryParent)
           throws InvalidStepArgException,
SelectionException,
QueryException,
MetadataManagerException
Drills to a relative level of the specified hierarchy accepting value's parent for optimization of drill steps later.
Specified by:
drill in interface DrillManager
Parameters:
dimension - The dimension to drill.
value - The dimension value, also known as the dimension member, to drill.
hierarchy - The target hierarchy for the drill.
delta - The relative number of levels to traverse within the specified hierarchy. Positive numbers drill down, negative numbers drill up.
valueParent - value's parent dimension value. This is used for optimizing later potential drill up requests.
queryParent - the item from the original query members under which this drill occurs
Throws:
InvalidStepArgException - If a step in a selection is bad.
SelectionException - If a selection cannot be created.
QueryException - If there is a problem fetching data after this operation.
MetadataManagerException - If an error occurred using the Database bean.

drill

public void drill(java.lang.String dimension,
                  java.lang.String value,
                  java.lang.String hierarchy,
                  int delta,
                  java.lang.String valueParent,
                  java.lang.String queryParent,
OlapQDR parentQDR)
           throws InvalidStepArgException,
SelectionException,
QueryException,
MetadataManagerException
Drills to a relative level of the specified hierarchy accepting a value's parent for optimization of drill steps later.
Specified by:
drill in interface DrillManager
Parameters:
dimension - The dimension to drill.
value - The dimension value, also known as the dimension member, to drill.
hierarchy - The target hierarchy for the drill.
delta - The relative number of levels to traverse within the specified hierarchy. Positive numbers drill down, negative numbers drill up.
valueParent - Value's parent dimension value; used for optimizing later potential drill up requests.
queryParent - The item from the original query members under which this drill occurs.
parentQDR - An optional OlapQDR specifying dimension/member pairs limiting where this drill (down) should take place (parents of the target)
Throws:
InvalidStepArgException - If a step in a selection is bad.
SelectionException - If a selection cannot be created.
QueryException - If there is a problem fetching data after this operation.
MetadataManagerException - If an error occurred using the MetadataManager bean.

drill

public void drill(java.lang.String dimension,
                  java.lang.String value,
                  java.lang.String hierarchy,
                  int delta,
                  java.lang.String valueParent,
                  java.lang.String queryParent,
                  int levelDepth,
OlapQDR parentQDR)
           throws InvalidStepArgException,
SelectionException,
QueryException,
MetadataManagerException
Drills to a relative level of the specified hierarchy accepting a value's parent for optimization of drill steps later.
Specified by:
drill in interface DrillManager
Parameters:
dimension - The dimension to drill.
value - The dimension value, also known as the dimension member, to drill.
hierarchy - The target hierarchy for the drill.
delta - The relative number of levels to traverse within the specified hierarchy. Positive numbers drill down, negative numbers drill up.
valueParent - Value's parent dimension value; used for optimizing later potential drill up requests.
queryParent - The item from the original query members under which this drill occurs.
levelDepth - Optional performance hint indicating the numeric level at which the drill target sits within its hierarchy
parentQDR - An optional OlapQDR specifying dimension/member pairs limiting where this drill (down) should take place (parents of the target)
Throws:
InvalidStepArgException - If a step in a selection is bad.
SelectionException - If a selection cannot be created.
QueryException - If there is a problem fetching data after this operation.
MetadataManagerException - If an error occurred using the MetadataManager bean.

drill

public void drill(java.lang.String dimension,
                  java.lang.String value,
                  java.lang.String hierarchy,
                  java.lang.String level,
                  int action,
                  java.util.BitSet flags)
           throws InvalidStepArgException,
SelectionException,
QueryException,
MetadataManagerException
Drill to specified level of the specified hierarchy.
Specified by:
drill in interface DrillManager
Parameters:
dimension - dimension to drill
value - dimension value to drill
hierarchy - target hierarchy
level - target level to traverse to
action - selection step action (e.g., Step.ADD)
flags - optional flags
Throws:
InvalidStepArgException - thrown if a step in a selection is bad
SelectionException - thrown if a selection can't be created
QueryException - thrown if there is a problem fetching data after this operation
MetadataManagerException - thrown if an error occurred using the database bean

layout

public java.lang.Boolean layout(java.lang.String[][] dimensions)
                         throws InvalidStepArgException,
SelectionException,
QueryException,
MetadataManagerException
Arrange the layout of dimensions along the query's edges.
Specified by:
layout in interface LayoutManager
Parameters:
dimensions - array of dimension layout arrays
Returns:
true if layout was acceptable, false if not
Throws:
InvalidStepArgException - thrown if a step in a selection is bad
SelectionException - thrown if a selection can't be created
QueryException - thrown if there is a problem fetching data after this operation
MetadataManagerException - thrown if an error occurred using the database bean

getLayout

public java.lang.String[][] getLayout()
Return the current layout of dimensions in the query as a two-dimensional String Note this method may throw a QueryRuntimeException
Specified by:
getLayout in interface LayoutManager
Returns:
current layout of query

pivot

public void pivot(java.lang.String source,
                  java.lang.String target,
                  int flags)
           throws InvalidStepArgException,
QueryException,
SelectionException,
MetadataManagerException
Perform the specified pivot operation.
Specified by:
pivot in interface LayoutManager
Parameters:
source - source dimension
target - target dimension
flags - pivot flags
Throws:
InvalidStepArgException - thrown if a step in a selection is bad
SelectionException - thrown if a selection can't be created
QueryException - thrown if there is a problem fetching data after this operation
MetadataManagerException - thrown if an error occurred using the database bean

swap

public void swap(java.lang.String source,
                 java.lang.String target)
          throws InvalidStepArgException,
QueryException,
SelectionException,
MetadataManagerException
Perform the specified swap operation.
Specified by:
swap in interface LayoutManager
Parameters:
source - source dimension
target - target dimension
Throws:
InvalidStepArgException - thrown if a step in a selection is bad
SelectionException - thrown if a selection can't be created
QueryException - thrown if there is a problem fetching data after this operation
MetadataManagerException - thrown if an error occurred using the database bean

swapEdges

public void swapEdges(int source,
                      int target)
               throws InvalidStepArgException,
QueryException,
SelectionException,
MetadataManagerException
Perform the specified edge swap operation.
Specified by:
swapEdges in interface LayoutManager
Parameters:
source - source edge
target - target edge
Throws:
InvalidStepArgException - thrown if a step in a selection is bad
SelectionException - thrown if a selection can't be created
QueryException - thrown if there is a problem fetching data after this operation
MetadataManagerException - thrown if an error occurred using the database bean

applySelection

public void applySelection(Selection selection)
                    throws InvalidStepArgException,
SelectionException,
QueryException,
MetadataManagerException
Apply the given Selection object to the corresponding Selection object in the Query.
Specified by:
applySelection in interface SelectionManager
Parameters:
selection - the selection to apply
Throws:
InvalidStepArgException - thrown if a step in a selection is bad
SelectionException - thrown if a selection can't be created
QueryException - thrown if there is a problem fetching data after this operation
MetadataManagerException - thrown if an error occurred using the database bean

removeSelection

public void removeSelection(Selection selection)
                     throws InvalidStepArgException,
SelectionException,
QueryException,
MetadataManagerException
Remove the given Selection object from the Query.
Specified by:
removeSelection in interface SelectionManager
Parameters:
selection - the selection to remove
Throws:
InvalidStepArgException - thrown if a step in a selection is bad
SelectionException - thrown if a selection can't be created
QueryException - thrown if there is a problem fetching data after this operation
MetadataManagerException - thrown if an error occurred using the database bean

applySelections

public void applySelections(Selection[] sels)
                     throws InvalidStepArgException,
SelectionException,
QueryException,
MetadataManagerException
Apply the given selections to the corresponding Selection objects in the Query.
Specified by:
applySelections in interface SelectionManager
Parameters:
selections - the selections to apply
Throws:
InvalidStepArgException - thrown if a step in a selection is bad
SelectionException - thrown if a selection can't be created
QueryException - thrown if there is a problem fetching data after this operation
MetadataManagerException - thrown if an error occurred using the database bean

updateCustomMeasures

public boolean updateCustomMeasures( selectionList,
                                     metadataManager)
Updates the custom measures, if necessary.
Parameters:
selectionList - a SelectionList value that represents the selections to process.
metadataManager - a MetadataManager used to retrieve metadata.
Returns:
boolean which is true when the measure dimension has been updated and false otherwise.

findAllSelections

public com.sun.java.util.collections.List findAllSelections()
Return a reference to the complete collection of Selection objects for the Query.
Specified by:
findAllSelections in interface SelectionManager
Returns:
the selection list

isDependentOn

public java.lang.Boolean isDependentOn(MDObject object)
Checks a given MDObject (measures are the only type of MDObject checked at this time) and determines if the query makes use of the object in its selections or measure list. Note that this routine may throw a QueryRuntimeException.
Specified by:
isDependentOn in interface MainManager
Parameters:
object - MDObject representing the object to check
Returns:
true if the query uses the object, false otherwise

findSelection

public Selection findSelection(com.sun.java.util.collections.List dimensions)
Retrieves a Selection object that corresponds to the specified dimensions. The Query is registered as a listener to this object so that changes to the underlying list of Step objects are captured as Query operations.
Specified by:
findSelection in interface SelectionManager
Parameters:
dimension - The dimensions for which to return the current Selection object.
Returns:
The Selection object that corresponds to the specified dimensions.

findSelection

public Selection findSelection(java.lang.String dimension)
Return a Selection object corresponding to the specified dimension.
Specified by:
findSelection in interface SelectionManager
Parameters:
dimension - the dimension for which to return the current selection object
Returns:
selection object

addCubeMeasures

public void addCubeMeasures(java.lang.String[] measures)
                     throws InvalidStepArgException,
SelectionException,
QueryException,
MetadataManagerException
Add one or more measures to an existing query. Creates query if it doesn't yet exist.
Specified by:
addCubeMeasures in interface MainManager
Parameters:
measures - the measures to add
Throws:
InvalidStepArgException - thrown if a step in a selection is bad
SelectionException - thrown if a selection can't be created
QueryException - thrown if there is a problem fetching data after this operation
MetadataManagerException - thrown if an error occurred using the database bean

applyDataMap

public void applyDataMap(DataMap map)
Request that the specified data layers be added to the underlying query These data layers will be included in subsequent cursors. Note that this routine may throw a QueryRuntimeException.
Specified by:
applyDataMap in interface MainManager
Parameters:
map - the DataMap containing desired layers

applyMetadataMap

public void applyMetadataMap(java.lang.String dimension,
MetadataMap map)
                      throws QueryException,
InvalidStepArgException,
MetadataManagerException,
SelectionException
Request that the specified metadatadata layers be added to the underlying query These metadata layers will be included in subsequent cursors.
Specified by:
applyMetadataMap in interface MainManager
Parameters:
dimension - dimension to which this map should be applied
map - the MetadataMap containing desired layers
Throws:
InvalidStepArgException - thrown if a step in a selection is bad
SelectionException - thrown if a selection can't be created
QueryException - thrown if there is a problem fetching data after this operation
MetadataManagerException - thrown if an error occurred using the database bean

applyMetadataMap

public void applyMetadataMap(int edge,
MetadataMap map)
                      throws QueryException,
InvalidStepArgException,
MetadataManagerException,
SelectionException
Request that the specified metadatadata layers be added to the underlying query These metadata layers will be included in subsequent cursors.
Specified by:
applyMetadataMap in interface MainManager
Parameters:
edge - edge to which this will be applied
map - the MetadataMap containing desired layers
Throws:
InvalidStepArgException - thrown if a step in a selection is bad
SelectionException - thrown if a selection can't be created
QueryException - thrown if there is a problem fetching data after this operation
MetadataManagerException - thrown if an error occurred using the database bean

initCubeQuery

public void initCubeQuery(java.lang.String[] measures,
                          java.lang.String[][] dimensions)
                   throws QueryException,
InvalidStepArgException,
SelectionException,
                          java.lang.IllegalArgumentException,
MetadataManagerException
Create a query based on one or more specified measures.
Specified by:
initCubeQuery in interface MainManager
Parameters:
measures - measures names
dimensions - optional array of dimension layout arrays
Throws:
QueryException - thrown if a cursor can't be created for this query
InvalidStepArgException - thrown if a step in a selection is bad
SelectionException - thrown if a selection can't be created
java.lang.IllegalArgumentException - thrown if one or more of the arguments is invalid
MetadataManagerException - thrown if an error occurred using the database bean

initQuery

public void initQuery(java.lang.String[][] dimensions,
                      java.lang.String[] measures)
               throws QueryException,
InvalidStepArgException,
SelectionException,
                      java.lang.IllegalArgumentException,
MetadataManagerException
Create a query based on the specified dimensions; an optional measure can also be specified.
Specified by:
initQuery in interface MainManager
Parameters:
dimensions - dimension layout arrays
measure - optional measure (may be null--OLAPI value source will be used in that case)
Throws:
QueryException - thrown if a cursor can't be created for this query
InvalidStepArgException - thrown if a step in a selection is bad
SelectionException - thrown if a selection can't be created
java.lang.IllegalArgumentException - thrown if one or more of the arguments is invalid
MetadataManagerException - thrown if an error occurred using the database bean

getMeasures

public java.lang.String[] getMeasures()
Return the current set of measuresin the query
Specified by:
getMeasures in interface MainManager
Overrides:
getMeasures in class Query
Returns:
current set of measures in query

validate

public ValidationObject validate(int validationType)
                          throws InvalidStepArgException,
MetadataManagerException,
SelectionException,
QueryException
Validate the entire Query with OLAPI
Specified by:
validate in interface MainManager
Parameters:
validationType - OR-able constants indicating types of validation to perform
Returns:
ValidationObject indicating results of validation
Throws:
InvalidStepArgException - If a step in a selection is bad.
SelectionException - If a selection cannot be created.
QueryException - If there is a problem fetching data after this operation.
MetadataManagerException - If an error occurred using the Database bean.

validate

public ValidationObject validate(int validationType,
                                 int edge)
                          throws InvalidStepArgException,
MetadataManagerException,
SelectionException,
QueryException
Validate the an entire edge with OLAPI
Specified by:
validate in interface MainManager
Parameters:
validationType - OR-able constants indicating types of validation to perform
edge - edge to validate
Returns:
ValidationObject indicating results of validation
Throws:
InvalidStepArgException - If a step in a selection is bad.
SelectionException - If a selection cannot be created.
QueryException - If there is a problem fetching data after this operation.
MetadataManagerException - If an error occurred using the Database bean.

validate

public ValidationObject validate(int validationType,
Selection selection)
                          throws InvalidStepArgException,
MetadataManagerException,
SelectionException,
QueryException
Validate a Selection with OLAPI
Specified by:
validate in interface MainManager
Parameters:
validationType - OR-able constants indicating types of validation to perform
selection - Selection to validate
Returns:
ValidationObject indicating results of validation
Throws:
InvalidStepArgException - If a step in a selection is bad.
SelectionException - If a selection cannot be created.
QueryException - If there is a problem fetching data after this operation.
MetadataManagerException - If an error occurred using the Database bean.

validate

public ValidationObject validate(int validationType,
Step step)
                          throws InvalidStepArgException,
MetadataManagerException,
SelectionException,
QueryException
Validate a specific Step with OLAPI
Specified by:
validate in interface MainManager
Parameters:
validationType - OR-able constants indicating types of validation to perform
step - Step to validate
Returns:
ValidationObject indicating results of validation
Throws:
InvalidStepArgException - If a step in a selection is bad.
SelectionException - If a selection cannot be created.
QueryException - If there is a problem fetching data after this operation.
MetadataManagerException - If an error occurred using the Database bean.

removeCubeMeasures

public void removeCubeMeasures(java.lang.String[] measures)
                        throws InvalidStepArgException,
SelectionException,
QueryException,
MetadataManagerException
Remove one or more measures from an existing query. Dimensionality is updated as appropriate.
Specified by:
removeCubeMeasures in interface MainManager
Parameters:
measures - list of measures to remove
Throws:
InvalidStepArgException - thrown if a step in a selection is bad
SelectionException - thrown if a selection can't be created
QueryException - thrown if there is a problem fetching data after this operation
MetadataManagerException - thrown if an error occurred using the database bean

setDataMap

public void setDataMap(DataMap map)
Request that the specified data layers be fetched for all clients and all subsequent cursors. Note that this routine may throw a QueryRuntimeException.
Specified by:
setDataMap in interface MainManager
Parameters:
map - the DataMap containing desired layers

setMetadataMap

public void setMetadataMap(java.lang.String dimension,
MetadataMap map)
                    throws QueryException,
InvalidStepArgException,
MetadataManagerException,
SelectionException
Request that the specified metadatadata layers be fetched for all clients and all subsequent cursors.
Specified by:
setMetadataMap in interface MainManager
Parameters:
dimension - dimension whose map to set
map - the MetadataMap containing desired layers
Throws:
InvalidStepArgException - thrown if a step in a selection is bad
SelectionException - thrown if a selection can't be created
QueryException - thrown if there is a problem fetching data after this operation
MetadataManagerException - thrown if an error occurred using the database bean

refresh

public void refresh(boolean rebuild)
             throws QueryException,
InvalidStepArgException,
SelectionException,
MetadataManagerException
Refreshes all cursors and/or structures of this Query object.
Specified by:
refresh in interface MainManager
Parameters:
rebuild - if true, refreshes the structural elements of the query such as calculations. If false, false a minimal refresh from the database is performed
Throws:
InvalidStepArgException - If a step in a selection is bad.
SelectionException - If a selection can not be created.
QueryException - If there is a problem fetching data after this operation.
MetadataManagerException - If an error occurred using the MetadataManager bean.

getDatabaseName

public java.lang.String getDatabaseName()
Return the name of the current database this Query's QueryManager is using.
Overrides:
getDatabaseName in class Query
Returns:
database name

getQueryState

public QueryState getQueryState()
                         throws CloneException
Grab a state marker (client side momento) for the current Query state
Specified by:
getQueryState in interface BaseManager
Returns:
state token
Throws:
CloneException - Thrown if the state cannot be duplicated

setQueryState

public void setQueryState(QueryState state)
                   throws QueryException,
InvalidStepArgException,
SelectionException,
MetadataManagerException
Set the Data Source back to a previously given state.
Specified by:
setQueryState in interface BaseManager
Parameters:
state - state previously given
Throws:
InvalidStepArgException - thrown if a step in a selection is bad
SelectionException - thrown if a selection can't be created
QueryException - thrown if there is a problem fetching data after this operation
MetadataManagerException - thrown if an error occurred using the database bean

setDefaultLayoutCounts

public void setDefaultLayoutCounts(int numCol,
                                   int numRow)
Set the default layout dimension count properties.
Parameters:
numCol - number of dimensions to put on the column
numRow - number of dimensions to put on the row

getCalcStep

public CalcStep getCalcStep(MDObject mdObject)
                     throws MetadataManagerException
Retrieves the CalcStep that is associated with the specified MDObject.
Parameters:
mdObject - The MDObject to retrieve the CalcStep from.
Returns:
A CalcStep that represents the CalcStep that is associated with the specified MDObject.
Throws:
MetadataManagerException - If a CalcStep object cannot be retrieved from the MDObject.

getXML

public java.lang.Object getXML( retCons)
Overrides:
getXML in class Query

setXML

public void setXML( context,
                   java.lang.Object node)
Overrides:
setXML in class Query

setEvaluateCursor

public void setEvaluateCursor(boolean evalCursor)
                       throws QueryException,
InvalidStepArgException,
SelectionException,
MetadataManagerException
Turn off actual cursor evaluation
Specified by:
setEvaluateCursor in interface BaseManager
Overrides:
setEvaluateCursor in class Query
Parameters:
eval - should cursors be evaluated?
Throws:
InvalidStepArgException - thrown if a step in a selection is bad
SelectionException - thrown if a selection can't be created
QueryException - thrown if there is a problem fetching data after this operation
MetadataManagerException - thrown if an error occurred using the database bean

submit

public boolean submit(com.sun.java.util.collections.List qdrCollection)
               throws QueryException

commit

public boolean commit()
               throws QueryException

setBaseState

public void setBaseState()
Establishes a base state for the ThinBean from which state changes that go onto the state string are tracked. This call will effectively clear the thin bean's current state string.

checkpointState

public void checkpointState()
Tells the ThinBean to start tracking state changes.
Following copied from interface: oracle.dss.thin.beans.CheckpointState
See Also:
ThinBean.getState(), BIStateManager

setState

public void setState(java.lang.String xml)
Sets a state string that represents the changes on the ThinBean, since the ThinBean was created or since setBaseState() was called. This string placed onto the URLs/Forms that an application generates, so that the application can re-establish the thin bean's state from a request's URL. This placing of an application's state onto the URL supports the ability for the application to support re-establishing application state from a bookmark. Note that this routine may throw a QueryRuntimeException.
Parameters:
a - ThinBean state

setCheckpointState

public void setCheckpointState(java.lang.String state)
                        throws ThinException
Used to set state differences from the last time that state was checkpointed.
Parameters:
state - the state differences from the last checkpoint
Throws:
ThinException - if the state could not be set

getState

public java.lang.String getState()
Returns a String that represents the changes in the ThinBean, since the ThinBean was created or since setBaseState() was called. This string placed onto the URLs/Forms that an application generates, so that the application can re-establish the thin bean's state from a request's URL. This placing of an application's state onto the URL supports the ability for the application to support re-establishing application state from a bookmark. Note this method may throw a QueryRuntimeException.
Returns:
the ThinBean's state

getCheckpointState

public java.lang.String getCheckpointState()
Used to retrieve the state differences from the last time that state was checkpointed. Note this method may throw a QueryRuntimeException.
Returns:
the state differences from the last checkpoint

Oracle™ Business Intelligence Beans Java API Reference
Release 10
g (9.0.4)
Part number B12159_01


Copyright © 2003, Oracle. All Rights Reserved.