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


oracle.dss.dataSource.common
Class Query

java.lang.Object
  |
  +--oracle.dss.dataSource.common.Query
All Implemented Interfaces:
BaseManager, CheckpointState, DataSource, 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
Direct Known Subclasses:
QueryClient, QueryServer

public abstract class Query
extends java.lang.Object
implements DataSource, javax.infobus.InfoBusMember, javax.infobus.InfoBusDataProducer, DrillManager, MainManager, BaseManager, SelectionManager, LayoutManager, java.io.Serializable, Persistable, QueryContext, LayoutContext, ThinBean, CheckpointState

Defines the data source API. Concrete classes are defined to implement certain calls on both the server and the client side of the QueryManager. Users should reference the Query class in their code to keep their code "tier agnostic." Only those who instantiate an actual Query object need to worry about the exact implementation subclass of Query (QueryClient or QueryServer).

See Also:
Serialized Form

Field Summary
static java.lang.String NO_EVALUATE_ON_LOAD
          Name of property that can be given to the Persistence environment when reloading a Query or a view that contains a query to indicate that the query should not be evaluated initially (sets the "EvaluateCursor" property to false).
static java.lang.String QUERY_MANAGER
          Name of reference resolver.

 

Constructor Summary
Query()
           Constructor for the Query.

 

Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
          Adds a property change listener.
 void addQueryListener(QueryListener l)
          Adds a listener to this Query object.
 boolean applyLayoutAccess(LayoutAccess la, boolean update)
          Updates the implementing Query with the changed layout information in the specified LayoutAccess object.
 boolean applyQueryAccess(QueryAccess qa, boolean update)
          Updates the implementing Query with the state changes (that is, Selection information) in the specified QueryAccess object.
 void cancel()
          Cancels the current operation operation.
 java.lang.Object clone()
          Clones this Query object.
 java.lang.Object clone(boolean evaluateCursor)
          Clones this Query and provides the performance option of bypassing cursor evaluation.
 void close()
          Closes any open Query middle tier references for proper clean up.
 CubeDataDirector createCubeDataDirector()
          Returns a DataDirector that manipulates the Query in a cube-like or multidimensional way.
 LayoutAccess createCubeLayoutAccess()
          Creates an implementation of the LayoutAccess interface that presents data with a cube layout.
 LayoutAccess createLayoutAccess()
          Creates and returns an object that implements the LayoutAccess interface.
 QueryAccess createQueryAccess()
          Creates and returns an object that implements the QueryAccess interface.
 RelationalDataDirector createRelationalDataDirector()
          Returns a DataDirector that manipulates the Query in a relational way.
 LayoutAccess createRelationalLayoutAccess()
          Creates an implementation of the LayoutAccess interface that presents data with a relational (table) layout.
 int getCurrentPage()
          Retrieves the current page number if pages are shared among listeners.
abstract  java.lang.String getDatabaseName()
          Return the name of the current database that this Query's QueryManager is using.
 DataMap getDataMap()
          Retrieves a DataMap object that represents all data types that have been requested by all current clients of this Query.
 int getDefaultColumnCount()
          Retrieves the default number of dimensions put on a column for default layouts.
 int getDefaultRowCount()
          Retrieves the default number of dimensions to put on a row for default layouts.
 boolean getFetchPageEdge()
          Returns whether entire page edges are fetched.
 int getFetchSize()
          Returns the currently-set fetch buffer size
abstract  java.lang.String[] getMeasures()
          Retrieves the list of measures that were used to produce the current query.
abstract  interface getMetadataManager()
          Return the current metadata manager set on this query
 MetadataMap getMetadataMap(int edge)
          Retrieves a MetadataMap object that represents all metadata map types that have been requested by all current clients of this Query for the specified edge.
 MetadataMap getMetadataMap(java.lang.String dimension)
          Retrieves a MetadataMap object that represents all metadata map types that have been requested by all current clients of this Query for the specified dimension.
 java.lang.String getName()
          Retrieves the name of this data source.
 QueryManager getQueryManager()
          Retrieves the QueryManager property value.
 int getSuppressColumns()
          Retrieves the suppression state (none, NA, zero, or both NA and zero) for the column edge of this Query object.
 int[] getSuppressionState()
          Retrieves the suppression state (none, NA, zero, or both NA and zero) for this Query object.
 int getSuppressionState(int index)
          Retrieves the suppression state (NA, zero, or both NA and zero) for an edge of this Query object.
 int getSuppressRows()
          Retrieves the suppression state (none, NA, zero, or both NA and zero) for the row edge of this Query object.
 java.lang.String getThinBeanName()
          Retrieves a name that is used to uniquely identify a ThinBean.
 boolean isAsymmetricDrilling()
          Indicates whether asymmetric drilling is set.
 boolean isAutoUpdate()
          Indicates whether all operations are sent to the middle tier for immediate processing or accumulated in a pending operations queue for later update.
 boolean isDebugMode()
          Indicates whether debug printouts will be produced.
 boolean isEvaluateCursor()
          Indicates whether cursor evaluation should be performed for a Query.
 boolean isHierarchicalDrilling()
          Indicates whether hierarchical drilling is set exclusively.
 boolean isPrintQueryState()
          Indicates whether query state printouts should be produced on every query operation.
 boolean isSeparatePage()
          Indicates whether page cursors are fetched separately from data cursors
 boolean isSharePage()
          Indicates whether page changes by one listener on the Query should be shared among all listeners.
 boolean isUpdatePending()
          Indicates whether any operations are pending.
 boolean isXMLValidated()
          Indicates whether the Query validates XML against its DTD.
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
          Removes a property change listener.
 void removeQueryListener(QueryListener l)
          Removes a listener from this Query.
 void setAsymmetricDrilling(boolean asymmetric)
          Indicates whether asymmetric drilling should be used
 void setAutoUpdate(boolean b)
          Controls whether operations should be sent to the middle tier for immediate processing or accumulated in a pending operations queue.
 void setCurrentPage(int page, QDR qdrPage)
          Specifies the current page if pages are shared among listeners.
 void setCurrentPageAndFireEvent(int page, QDR qdrPage, DataChangedEvent e)
           
 void setDebugMode(boolean mode)
          Indicates whether debug printouts should be produced.
 void setDefaultColumnCount(int numCol)
          Specifies the default number of dimensions to put on a column for default layouts.
 void setDefaultRowCount(int numRow)
          Specifies the default number of dimensions to put on a row for default layouts.
 void setEvaluateCursor(boolean evalCursor)
          Controls actual cursor evaluation.
 void setFetchPageEdge(boolean fullfetch)
          Sets whether entire page edges are fetched.
 void setFetchSize(int size)
          Sets fetch buffer size
 void setHierarchicalDrilling(boolean hierDrill)
          Specifies whether hierarchical drilling should be used exclusively.
 void setMeasures(java.lang.String[] measures)
          Specifies a list of measures and creates a default cube for the query.
 void setName(java.lang.String n)
          Specifies the name of this data source.
 void setPrintQueryState(boolean mode)
          Indicates whether query state printouts should be produced on every query operation.
 void setQueryManager(QueryManager qmc)
          Specifies the QueryManager property.
 void setSeparatePage(boolean separate)
          Indicates whether pages are fetched as separate cursors
 void setSharePage(boolean b)
          Specifies whether page changes are transmitted among listeners.
 void setSuppressColumns(int suppress)
          Specifies the suppression state (none, NA, zero, or both NA and zero) on the column edge of the query when data is fetched.
 void setSuppressionState(int[] suppress)
          Specifies the suppression state (none, NA, zero, or both NA and zero) to use for this Query when data is fetched.
 void setSuppressionState(int index, int suppress)
          Specifies the suppression (none, NA, zero, or both NA and zero) for an edge of this Query object when data is fetched.
 void setSuppressRows(int suppress)
          Specifies the suppression state (none, NA, zero, or both NA and zero) on the row edge of a query when data is fetched.
 void setThinBeanName(java.lang.String thinBeanName)
          Specifies a name that is used to uniquely identify a ThinBean.
 void setXMLValidated(boolean validate)
          Specifies whether the Query validates XML against its DTD.
 void update()
          Signals the Query to execute pending operations in sequence.

 

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

 

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.dataSource.common.DrillManager
drill, drill, drill, drill

 

Methods inherited from interface oracle.dss.dataSource.common.BaseManager
getQueryState, setQueryState

 

Methods inherited from interface oracle.dss.dataSource.common.MainManager
addCubeMeasures, applyDataMap, applyMetadataMap, applyMetadataMap, initCubeQuery, initQuery, isDependentOn, refresh, removeCubeMeasures, setDataMap, setMetadataMap, validate, validate, validate, validate

 

Methods inherited from interface oracle.dss.dataSource.common.SelectionManager
applySelection, applySelections, findAllSelections, findSelection, findSelection, getUniverseSelection, removeSelection, setUniverseSelection

 

Methods inherited from interface oracle.dss.dataSource.common.LayoutManager
getLayout, layout, pivot, swap, swapEdges

 

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

 

Methods inherited from interface oracle.dss.thin.beans.ThinBean
getState, setBaseState, setState

 

Methods inherited from interface oracle.dss.thin.beans.CheckpointState
checkpointState, getCheckpointState, setCheckpointState

 

Field Detail

QUERY_MANAGER

public static final java.lang.String QUERY_MANAGER
Name of reference resolver. This is the name to use when passing the QueryManager in the PersistenceManager's environment argument for automatic connection on lookup().

NO_EVALUATE_ON_LOAD

public static final java.lang.String NO_EVALUATE_ON_LOAD
Name of property that can be given to the Persistence environment when reloading a Query or a view that contains a query to indicate that the query should not be evaluated initially (sets the "EvaluateCursor" property to false).
Constructor Detail

Query

public Query()
      Constructor for the Query.
Method Detail

setQueryManager

public void setQueryManager(QueryManager qmc)
                     throws java.lang.Exception
Specifies the QueryManager property. If a Query object is created by the factory method (createQuery) of the QueryManager, then this property is also specified automatically at that time. If you create a Query object by using the constructor in this Query class, then you must also specify the QueryManager property before the Query object can run.
Parameters:
qmc - QueryManager instance
Throws:
java.lang.Exception - Error encountered when bringing back a query from persistence.

getQueryManager

public QueryManager getQueryManager()
Retrieves the QueryManager property value.
Returns:
A reference to the QueryManager object or null.
Throws:
QueryRuntimeException - thrown if the QueryManager is null.

addQueryListener

public void addQueryListener(QueryListener l)
Adds a listener to this Query object. Note this method may throw a QueryRuntimeException.
Specified by:
addQueryListener in interface BaseManager
Parameters:
l - The listener that is to be added.

removeQueryListener

public void removeQueryListener(QueryListener l)
Removes a listener from this Query.
Specified by:
removeQueryListener in interface BaseManager
Parameters:
l - The listener that is to be removed.

update

public void update()
            throws java.lang.Exception
Signals the Query to execute pending operations in sequence.
Specified by:
update in interface BaseManager
Throws:
java.lang.Exception - If any middle tier exception occurs.

cancel

public void cancel()
Cancels the current operation operation.
Specified by:
cancel in interface BaseManager

close

public void close()
Closes any open Query middle tier references for proper clean up. Note this method may throw a QueryRuntimeException.

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds a property change listener.
Parameters:
l - The listener that is to be added.

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes a property change listener.
Parameters:
l - The listener that is to be removed.

setAutoUpdate

public void setAutoUpdate(boolean b)
                   throws java.lang.Exception
Controls whether operations should be sent to the middle tier for immediate processing or accumulated in a pending operations queue.
Specified by:
setAutoUpdate in interface BaseManager
Parameters:
b - true sends each operation for immediate processing; false lets operations accumulate in a pending operations queue.
Throws:
All - Any of the exceptions that are contained in the operations that are currently in the queue.

isAutoUpdate

public boolean isAutoUpdate()
Indicates whether all operations are sent to the middle tier for immediate processing or accumulated in a pending operations queue for later update.
Specified by:
isAutoUpdate in interface BaseManager
Returns:
true if operations are sent to the middle tier for immediate processing; false if operations are accumulated in a pending operations queue for later update.

isUpdatePending

public boolean isUpdatePending()
Indicates whether any operations are pending. Always returns false if the AutoUpdate property is set to true.

Note:Pending operations can be sent to the middle tier for processing by calling the update method or by calling the setAutoUpdate method with the parameter true.

Specified by:
isUpdatePending in interface BaseManager
Returns:
true if operations are pending; false if there are no operations pending.

setMeasures

public void setMeasures(java.lang.String[] measures)
Specifies a list of measures and creates a default cube for the query.
Parameters:
measures - The list of measures to use to make a default cube.

getMeasures

public abstract java.lang.String[] getMeasures()
Retrieves the list of measures that were used to produce the current query.
Specified by:
getMeasures in interface MainManager
Returns:
The list of measures.

setDefaultColumnCount

public void setDefaultColumnCount(int numCol)
Specifies the default number of dimensions to put on a column for default layouts.
Parameters:
numCol - The number of dimensions to put on the column for default layouts.

getDefaultColumnCount

public int getDefaultColumnCount()
Retrieves the default number of dimensions put on a column for default layouts.
Returns:
The default number of dimensions.

setDefaultRowCount

public void setDefaultRowCount(int numRow)
Specifies the default number of dimensions to put on a row for default layouts.
Parameters:
numRow - The number of dimensions to put on the row for default layouts.

getDefaultRowCount

public int getDefaultRowCount()
Retrieves the default number of dimensions to put on a row for default layouts.
Returns:
The number of dimensions to put on a row for default layouts.

setDebugMode

public void setDebugMode(boolean mode)
Indicates whether debug printouts should be produced.
Parameters:
mode - true produces debug printouts on both client and server; false does not produce debug printouts.

isDebugMode

public boolean isDebugMode()
Indicates whether debug printouts will be produced.
Returns:
true indicates that debug printouts will be produced; false indicates that debug printouts will not be produced.

setPrintQueryState

public void setPrintQueryState(boolean mode)
Indicates whether query state printouts should be produced on every query operation.
Parameters:
mode - true produces state printouts on server; false does not produce state printouts.

isPrintQueryState

public boolean isPrintQueryState()
Indicates whether query state printouts should be produced on every query operation.
Returns:
true indicates that state printouts will be produced; false indicates that state printouts will not be produced.

setHierarchicalDrilling

public void setHierarchicalDrilling(boolean hierDrill)
Specifies whether hierarchical drilling should be used exclusively.
Specified by:
setHierarchicalDrilling in interface BaseManager
Parameters:
hierDrill - true indicates always use hierarchical drilling; false indicates drilling is not restricted exclusively to hierarchical.

isHierarchicalDrilling

public boolean isHierarchicalDrilling()
Indicates whether hierarchical drilling is set exclusively.
Specified by:
isHierarchicalDrilling in interface BaseManager
Returns:
true if hierarchical drilling is used exclusively; false if hierarchical drilling is not set exclusively.

setAsymmetricDrilling

public void setAsymmetricDrilling(boolean asymmetric)
Indicates whether asymmetric drilling should be used
Specified by:
setAsymmetricDrilling in interface BaseManager
Parameters:
asymmetric - true to use asymmetric drilling

isAsymmetricDrilling

public boolean isAsymmetricDrilling()
Indicates whether asymmetric drilling is set.
Specified by:
isAsymmetricDrilling in interface BaseManager
Returns:
true if asymmetric drilling is set; false if asymmetric drilling is not set.

setSeparatePage

public void setSeparatePage(boolean separate)
Indicates whether pages are fetched as separate cursors
Parameters:
separate - code>true to separate page cursors from the data cursor

isSeparatePage

public boolean isSeparatePage()
Indicates whether page cursors are fetched separately from data cursors
Returns:
true if page cursors are separate false if the entire query is one cursor

setFetchSize

public void setFetchSize(int size)
Sets fetch buffer size
Specified by:
setFetchSize in interface BaseManager
Parameters:
size - integer indicating number of values to fetch per buffer read for cursors. -1 turns partial fetching off and fetches the entire cursor

getFetchSize

public int getFetchSize()
Returns the currently-set fetch buffer size
Specified by:
getFetchSize in interface BaseManager
Returns:
currently set fetch buffer size. -1 if fetch all is set

setFetchPageEdge

public void setFetchPageEdge(boolean fullfetch)
Sets whether entire page edges are fetched. Default is true.
Specified by:
setFetchPageEdge in interface BaseManager
Parameters:
fullfetch - if true, the page edge is fully fetched. If not, partial fetching applies.

getFetchPageEdge

public boolean getFetchPageEdge()
Returns whether entire page edges are fetched.
Specified by:
getFetchPageEdge in interface BaseManager
Returns:
true if entire page edges are fetched.

setSharePage

public void setSharePage(boolean b)
Specifies whether page changes are transmitted among listeners. By default, if there are multiple listeners of any kind on a Query, then a change to the page edge of the query by one listener will be transmitted to the cursors of all the other listeners. (Each listener has its own copy of the cursor on the client side.)
Parameters:
b - true indicates that page changes should be shared among all listeners; false indicates that a page change by one listener will not be shared among the other listeners.

isSharePage

public boolean isSharePage()
Indicates whether page changes by one listener on the Query should be shared among all listeners.
Returns:
true indicates that page changes by one listener will be shared among all listeners; false indicates that page changes by one listener will not be shared among all listeners.

setCurrentPage

public void setCurrentPage(int page,
QDR qdrPage)
Specifies the current page if pages are shared among listeners.
Parameters:
page - Page number to share among listeners.
qdrPage - QDR version of the page.

setCurrentPageAndFireEvent

public void setCurrentPageAndFireEvent(int page,
QDR qdrPage,
DataChangedEvent e)

getCurrentPage

public int getCurrentPage()
Retrieves the current page number if pages are shared among listeners.
Returns:
Page number that is being shared among listeners.

setSuppressionState

public void setSuppressionState(int index,
                                int suppress)
                         throws java.lang.ArrayIndexOutOfBoundsException
Specifies the suppression (none, NA, zero, or both NA and zero) for an edge of this Query object when data is fetched.
Specified by:
setSuppressionState in interface BaseManager
Parameters:
index - A constant that represents the edge of interest. Valid constants are in oracle.dss.util.DataDirector.
suppress - Identifies the kind of suppression. Valid constants are in oracle.dss.util.DataDirector.
Throws:
java.lang.ArrayIndexOutOfBoundsException - If index is invalid.
See Also:
DataDirector.NO_SUPPRESSION, DataDirector.NA_SUPPRESSION, DataDirector.ZERO_SUPPRESSION, DataDirector.NA_ZERO_SUPPRESSION, DataDirector.COLUMN_EDGE, DataDirector.PAGE_EDGE, DataDirector.ROW_EDGE

getSuppressColumns

public int getSuppressColumns()
Retrieves the suppression state (none, NA, zero, or both NA and zero) for the column edge of this Query object.
Returns:
The current suppression state for the column edge of the query. Valid values are in oracle.dss.util.DataDirector.
See Also:
DataDirector.NO_SUPPRESSION, DataDirector.NA_SUPPRESSION, DataDirector.ZERO_SUPPRESSION, DataDirector.NA_ZERO_SUPPRESSION

getSuppressionState

public int getSuppressionState(int index)
                        throws java.lang.ArrayIndexOutOfBoundsException
Retrieves the suppression state (NA, zero, or both NA and zero) for an edge of this Query object.
Specified by:
getSuppressionState in interface BaseManager
Parameters:
index - A constant that represents the edge of interest. Valid constants are found in oracle.dss.util.DataDirector.
Returns:
The current setting of the specified edge in the SuppressionState property. Valid constants are in oracle.dss.util.DataDirector.
Throws:
java.lang.ArrayIndexOutOfBoundsException - If the index parameter is invalid.
See Also:
DataDirector.NO_SUPPRESSION, DataDirector.NA_SUPPRESSION, DataDirector.ZERO_SUPPRESSION, DataDirector.NA_ZERO_SUPPRESSION, DataDirector.COLUMN_EDGE, DataDirector.PAGE_EDGE, DataDirector.ROW_EDGE

setSuppressionState

public void setSuppressionState(int[] suppress)
Specifies the suppression state (none, NA, zero, or both NA and zero) to use for this Query when data is fetched.
Parameters:
suppress - Identifies the kind of suppression. Valid values are in oracle.dss.util.DataDirector.
See Also:
DataDirector.NO_SUPPRESSION, DataDirector.NA_SUPPRESSION, DataDirector.ZERO_SUPPRESSION, DataDirector.NA_ZERO_SUPPRESSION

getSuppressionState

public int[] getSuppressionState()
Retrieves the suppression state (none, NA, zero, or both NA and zero) for this Query object.
Returns:
The current setting of the SuppressionState property for this Query object. Valid values are in oracle.dss.util.DataDirector.
See Also:
DataDirector.NO_SUPPRESSION, DataDirector.NA_SUPPRESSION, DataDirector.ZERO_SUPPRESSION, DataDirector.NA_ZERO_SUPPRESSION

setSuppressColumns

public void setSuppressColumns(int suppress)
Specifies the suppression state (none, NA, zero, or both NA and zero) on the column edge of the query when data is fetched.
Parameters:
suppress - Identifies the kind of suppression. Valid constants are in oracle.dss.util.DataDirector
See Also:
DataDirector.NO_SUPPRESSION, DataDirector.NA_SUPPRESSION, DataDirector.ZERO_SUPPRESSION, DataDirector.NA_ZERO_SUPPRESSION

setSuppressRows

public void setSuppressRows(int suppress)
Specifies the suppression state (none, NA, zero, or both NA and zero) on the row edge of a query when data is fetched.
Parameters:
suppress - Identifies the kind of suppression. Valid constants are in oracle.dss.util.DataDirector.
See Also:
DataDirector.NO_SUPPRESSION, DataDirector.NA_SUPPRESSION, DataDirector.ZERO_SUPPRESSION, DataDirector.NA_ZERO_SUPPRESSION

getSuppressRows

public int getSuppressRows()
Retrieves the suppression state (none, NA, zero, or both NA and zero) for the row edge of this Query object.
Returns:
The current suppression state for the row edge of the query. Valid constants are in oracle.dss.util.DataDirector.
See Also:
DataDirector.NO_SUPPRESSION, DataDirector.NA_SUPPRESSION, DataDirector.ZERO_SUPPRESSION, DataDirector.NA_ZERO_SUPPRESSION

setName

public void setName(java.lang.String n)
Specifies the name of this data source.
Parameters:
n - The name of this data source.

getName

public java.lang.String getName()
Retrieves the name of this data source.
Returns:
The name of this data source.

createCubeDataDirector

public CubeDataDirector createCubeDataDirector()
Returns a DataDirector that manipulates the Query in a cube-like or multidimensional way. Used for OLAP views.
Specified by:
createCubeDataDirector in interface DataSource
Returns:
An implementation of a CubeDataDirector interface.
See Also:
CubeDataDirector

createRelationalDataDirector

public RelationalDataDirector createRelationalDataDirector()
Returns a DataDirector that manipulates the Query in a relational way. Used for relational views.
Specified by:
createRelationalDataDirector in interface DataSource
Returns:
An implementation of a RelationalDataDirector interface.
See Also:
RelationalDataDirector

createLayoutAccess

public LayoutAccess createLayoutAccess()
Creates and returns an object that implements the LayoutAccess interface. This object can make use of the LayoutContext object, which is also implemented by this Query, for state and layout manipulation services.
Specified by:
createLayoutAccess in interface LayoutContext
Returns:
A new implementation of the LayoutAccess interface.

createCubeLayoutAccess

public LayoutAccess createCubeLayoutAccess()
Creates an implementation of the LayoutAccess interface that presents data with a cube layout.
Specified by:
createCubeLayoutAccess in interface LayoutContext
Returns:
An object that implements the LayoutAccess interface.

createRelationalLayoutAccess

public LayoutAccess createRelationalLayoutAccess()
Creates an implementation of the LayoutAccess interface that presents data with a relational (table) layout.
Specified by:
createRelationalLayoutAccess in interface LayoutContext
Returns:
An object that implements the LayoutAccess interface.

applyLayoutAccess

public boolean applyLayoutAccess(LayoutAccess la,
                                 boolean update)
Updates the implementing Query with the changed layout information in the specified LayoutAccess object. Note this method may throw a QueryRuntimeException.
Specified by:
applyLayoutAccess in interface LayoutContext
Parameters:
la - LayoutAccess object to use for the update. The update will be applied to the LayoutContext.
update - true if the caller is finished with all the updates and the Query should do what is necessary to run the query with the new layout state; false if the caller is not finished with the updates.

createQueryAccess

public QueryAccess createQueryAccess()
Creates and returns an object that implements the QueryAccess interface. This object can make use of the QueryContext object, which is also implemented by this Query, for state and Selection evaluation services.
Specified by:
createQueryAccess in interface QueryContext
Returns:
A new implementation of the QueryAccess interface.

applyQueryAccess

public boolean applyQueryAccess(QueryAccess qa,
                                boolean update)
Updates the implementing Query with the state changes (that is, Selection information) in the specified QueryAccess object. It is the responsibility of the QueryContext implementor (that is, the QueryManager for the BI beans) to initialize itself using the QueryAccess state or reasonable defaults, if necessary.
Specified by:
applyQueryAccess in interface QueryContext
Parameters:
qa - The QueryAccess object to use for update.
update - true if the caller is finished with updating the QueryContext and the Query is free to run a query based on the new state; false if the caller is not finished with the updates.
Returns:
true if the update is successful; false if the update is not successful.

setEvaluateCursor

public void setEvaluateCursor(boolean evalCursor)
                       throws QueryException,
InvalidStepArgException,
SelectionException,
MetadataManagerException
Controls actual cursor evaluation. The default setting for the EvaluateCursor property is true. If this setting is changed to false, then the clone(boolean) method bypasses cursor evaluation when copying a Query.
Specified by:
setEvaluateCursor in interface BaseManager
Parameters:
evalCursor - Indicates whether cursors should be evaluated for a Query.
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.

isEvaluateCursor

public boolean isEvaluateCursor()
Indicates whether cursor evaluation should be performed for a Query. If the EvaluateCursor property is set to false before the clone (boolean) method is called, then a newly cloned Query will not have any data or metadata values in its cursors. The cursors will contain only basic edge, layer level wireframe information (such as the dimensions and where they are located in the layout).
Specified by:
isEvaluateCursor in interface BaseManager
Returns:
true if cursor evaluation should be performed; false if cursor evaluation should be bypassed.

getDataMap

public DataMap getDataMap()
Retrieves a DataMap object that represents all data types that have been requested by all current clients of this Query.
Specified by:
getDataMap in interface MainManager
Returns:
The DataMap that contains all the desired data map types.

getMetadataMap

public MetadataMap getMetadataMap(java.lang.String dimension)
Retrieves a MetadataMap object that represents all metadata map types that have been requested by all current clients of this Query for the specified dimension.
Specified by:
getMetadataMap in interface MainManager
Parameters:
dimension - The dimension for which to return the map; null if default.
Returns:
The MetadataMap object that contains all desired metadata map types.

getMetadataMap

public MetadataMap getMetadataMap(int edge)
Retrieves a MetadataMap object that represents all metadata map types that have been requested by all current clients of this Query for the specified edge.
Specified by:
getMetadataMap in interface MainManager
Parameters:
edge - A constant that represents the edge for which to return the MetadataMap. The valid constants (COLUMN_EDGE, PAGE_EDGE, ROW_EDGE) are found in oracle.dss.util.DataDirector.
Returns:
The MetadataMap that contains all metadata map types for the specified edge.
See Also:
DataDirector.COLUMN_EDGE, DataDirector.PAGE_EDGE, DataDirector.ROW_EDGE

getDatabaseName

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

setXMLValidated

public void setXMLValidated(boolean validate)
Specifies whether the Query validates XML against its DTD.
Parameters:
validate - true to have XML validated, false to have the Query apply the XML without testing for validity.

isXMLValidated

public boolean isXMLValidated()
Indicates whether the Query validates XML against its DTD.
Returns:
true if the Query validates XML, false if the Query applies XML without validation.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clones this Query object.
Specified by:
clone in interface BaseManager
Returns:
A newly-created copy of the Query.
Throws:
java.lang.CloneNotSupportedException - If the clone cannot be created

clone

public java.lang.Object clone(boolean evaluateCursor)
                       throws java.lang.CloneNotSupportedException
Clones this Query and provides the performance option of bypassing cursor evaluation. If the EvaluateCursor property is set to false, then the Query does not ask OLAPI to create a cursor based on the user's API calls. The caller of this method still gets the full set of events along with the "cursors" but these cursors will not have any data or metadata values in them. The cursors will contain only basic edge, layer level wireframe information (such as the dimensions and where they are located in the layout).
Parameters:
evaluateCursor - true if this clone should have cursor evaluation turned on (this is the default value); false if this clone does not require cursor evaluation.
Returns:
A newly-created copy of the Query.
Throws:
java.lang.CloneNotSupportedException - If a Query cannot be cloned.
See Also:
isEvaluateCursor(), setEvaluateCursor(boolean)

getMetadataManager

public abstract getMetadataManager()
Return the current metadata manager set on this query

setThinBeanName

public void setThinBeanName(java.lang.String thinBeanName)
Specifies a name that is used to uniquely identify a ThinBean. An application can have multiple thin beans at the same time. Events that a ThinBean generates include a source event parameter (which is a query parameter on a URL). The source parameter has a value that is a ThinBeanName.
Specified by:
setThinBeanName in interface ThinBean
Parameters:
thinBeanName - The name of the ThinBean.

getThinBeanName

public java.lang.String getThinBeanName()
Retrieves a name that is used to uniquely identify a ThinBean. An application can have multiple thin beans at the same time. Events that a ThinBean generates include a source event parameter (which is a query parameter on a URL). The source parameter has a value that is a ThinBeanName.
Specified by:
getThinBeanName in interface ThinBean
Returns:
The name of a ThinBean.

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


Copyright © 2003, Oracle. All Rights Reserved.