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


oracle.dss.datautil
Interface QueryAccess


public interface QueryAccess

Methods that the QueryBuilder and CalcBuilder beans use to manage changes to selection objects. Selection objects for specific dimensions (along with the layout of the dimensions) provide state for a query-creating component such as the Query object.


Field Summary
static java.lang.String METADATA_BLOCK
          Internal metadata type for step source blocks.
static java.lang.String METADATA_QUERYPARENT
          Internal metadata type for query parent information.

 

Method Summary
 void addQueryAccessListener(QueryAccessListener l)
          Adds a listener to the listener list
 boolean drillList(java.lang.String dimension, java.lang.String value, int delta, boolean optimize)
          Adds a Step object to perform drilling on the specified dimension's selection.
 DataAccess getDataAccess(Selection selection)
          Retrieves the DataAccess object for a specified selection.
 DataAccess getDataAccess(Selection selection, MetadataMap map)
          Retrieves the DataAccess object for a specified selection.
 DataAccess getDataAccess(java.lang.String dimension)
          Retrieves a DataAccess object that contains dimension member metadata positioned at the stored selection for the specified dimension.
 java.util.Vector getDimensions(java.lang.String type)
          Retrieves the current dimensionality tracked by the QueryAccess object or the set of measures chosen in the selection table for the specified type of metadata.
 java.lang.String getMeasureDimension(java.lang.String type)
          Retrieves the name of the measure dimension that is currently used by the QueryAccess object.
 OlapQDR getQDR(java.lang.String measure, java.lang.String dimension, java.lang.String type)
          Retrieves the properly initialized OLAPQDR for the specified measure and dimension.
 Selection getSelection(java.lang.String dimension)
          Retrieves the selection object that is currently stored for the specified dimension.
 boolean isSelectionSet(java.lang.String dimension)
          Indicates whether a specified dimension has a selection stored for it in the QueryAccess object.
 void release()
          Cleans up the QueryAccess implementation.
 void removeQueryAccessListener(QueryAccessListener l)
          Removes a listener from the listener list.
 void setMetadataMap(MetadataMap map)
          Specifies the types of metadata to use for all cursor evaluation.
 void setSelection(Selection sel)
          Stores the specified selection in the selection collection and uses the selection's dimension as its key.
 void updateDimensions(java.lang.String[] measures)
          Updates the current dimension list based on a specified set of measures.

 

Field Detail

METADATA_BLOCK

public static final java.lang.String METADATA_BLOCK
Internal metadata type for step source blocks. Used by the QueryBuilder to access "extra" metadata for the drill call on a Selection. Optional.

METADATA_QUERYPARENT

public static final java.lang.String METADATA_QUERYPARENT
Internal metadata type for query parent information. Used by the QueryBuilder to access "extra" metadata for the drill call on a Selection. Optional.
Method Detail

addQueryAccessListener

public void addQueryAccessListener(QueryAccessListener l)
Adds a listener to the listener list
Parameters:
l - The QueryAccessListener to add to the listener list.

removeQueryAccessListener

public void removeQueryAccessListener(QueryAccessListener l)
Removes a listener from the listener list.
Parameters:
l - The QueryAccessListener to remove from the listener list.

release

public void release()
Cleans up the QueryAccess implementation. Informs the QueryAccess implementation that its user is done and that this implementation will no longer be called or passed as an argument to the applyQueryAccess method.

drillList

public boolean drillList(java.lang.String dimension,
                         java.lang.String value,
                         int delta,
                         boolean optimize)
Adds a Step object to perform drilling on the specified dimension's selection. Drills to a relative level at the specified position.
Parameters:
dimension - The dimension whose selection should be drilled.
value - The dimension member to be drilled.
delta - The relative number of levels to traverse within the hierarchy that is specified in the dimension's selection (positive numbers drill down, negative numbers drill up).
optimize - true allows the optimization of not preserving the steps in a selection; false does not allow this optimization.
Returns:
true if the drill succeeds; false if the drill does not succeed.

getDataAccess

public DataAccess getDataAccess(Selection selection)
Retrieves the DataAccess object for a specified selection.
Returns:
A DataAccess object that contains the specified selection.

getDataAccess

public DataAccess getDataAccess(Selection selection,
MetadataMap map)
Retrieves the DataAccess object for a specified selection.
Parameters:
map - Specifies the desired metadata for the resulting DataAccess.
Returns:
A DataAccess object that contains the specified selection.

getDataAccess

public DataAccess getDataAccess(java.lang.String dimension)
Retrieves a DataAccess object that contains dimension member metadata positioned at the stored selection for the specified dimension.
Returns:
A DataAccess object that contains the specified dimension; an empty DataAccess object, which contains zero values, if there is no selection available to evaluate.

getSelection

public Selection getSelection(java.lang.String dimension)
Retrieves the selection object that is currently stored for the specified dimension.
Parameters:
dimension - The dimension for which to return the selection object.
Returns:
The selection object that is stored for the specified dimension; null if there is no dimension stored and if the underlying QueryContext can not provide a selection for the specified dimension.

setSelection

public void setSelection(Selection sel)
Stores the specified selection in the selection collection and uses the selection's dimension as its key. These stored selections can be applied to the QueryContext implementor later through the applyQueryAccess method. To retrieve a stored selection, use getSelection(selection.getDimension()).

Invoking the setSelection method causes isSelectionSet(selection.getDimension()) to return true.

Parameters:
sel - The selection to store.

isSelectionSet

public boolean isSelectionSet(java.lang.String dimension)
Indicates whether a specified dimension has a selection stored for it in the QueryAccess object.
Parameters:
dimension - The dimension to test.
Returns:
true if the dimension has a selection stored for it, false if the dimension does not have a selection stored for it. Note that whether the underlying QueryContext implementation can provide a selection for the specified dimension does not determine the return value.

getDimensions

public java.util.Vector getDimensions(java.lang.String type)
Retrieves the current dimensionality tracked by the QueryAccess object or the set of measures chosen in the selection table for the specified type of metadata.
Parameters:
type - One of the enumerated label types in oracle.dss.util.LayerMetadataMap that specifies the type of metadata to be returned (such as dimension database name, short label, long label, etc.).
Returns:
The list of dimension member name strings.
See Also:
LayerMetadataMap.LAYER_METADATA_NAME, LayerMetadataMap.LAYER_METADATA_LONGLABEL, LayerMetadataMap.LAYER_METADATA_MEDIUMLABEL, LayerMetadataMap.LAYER_METADATA_SHORTLABEL

updateDimensions

public void updateDimensions(java.lang.String[] measures)
Updates the current dimension list based on a specified set of measures. This method can delete stored selection objects whose dimensions do not match the new dimensionality of the specified measures. This method alters the list that is returned by the getDimensions method.
Parameters:
measures - The list of measures from which to determine the legal stored selections and the dimension list.

getMeasureDimension

public java.lang.String getMeasureDimension(java.lang.String type)
Retrieves the name of the measure dimension that is currently used by the QueryAccess object.
Parameters:
type - One of the enumerated label types in oracle.dss.util.LayerMetadataMap that specifies the type of metadata to be returned (such as dimension database name, short label, long label, etc.).
Returns:
The name of the measure dimension in the specified label type.
See Also:
LayerMetadataMap.LAYER_METADATA_NAME, LayerMetadataMap.LAYER_METADATA_LONGLABEL, LayerMetadataMap.LAYER_METADATA_MEDIUMLABEL, LayerMetadataMap.LAYER_METADATA_SHORTLABEL

getQDR

public OlapQDR getQDR(java.lang.String measure,
                      java.lang.String dimension,
                      java.lang.String type)
Retrieves the properly initialized OLAPQDR for the specified measure and dimension. This OLAPQDR leaves the following dimensions as varying dimensions: any dimensions on the page edge or on the same edge as the specified dimension; all other dimensions are fixed.

Note: An OLAPQDR (qualified data reference) is a reference to a subset of the values in a data source such as the Query object. For example, an OLAPQDR might refer to a Sales measure, but only to those values for the month of May. In another example, an OLAPQDR might refer to a Units measure, but only to the single value that represents the units of TVs sold by catalog in May in Dublin.

Parameters:
measure - The measure to use in initializing the OLAPQDR. This measure determines the dimensions to include in the fully qualified OLAPQDR.
dimension - The dimension that represents the edge on which other dimensions should be varying rather than fixed within the OLAPQDR.
type - One of the enumerated label types in oracle.dss.util.LayerMetadataMap that specifies the type of metadata to be returned (such as dimension database name, short label, long label, etc.).
Returns:
The OlapQDR object initialized with the correct values for the specified measure and dimension.
See Also:
LayerMetadataMap.LAYER_METADATA_NAME, LayerMetadataMap.LAYER_METADATA_LONGLABEL, LayerMetadataMap.LAYER_METADATA_MEDIUMLABEL, LayerMetadataMap.LAYER_METADATA_SHORTLABEL

setMetadataMap

public void setMetadataMap(MetadataMap map)
Specifies the types of metadata to use for all cursor evaluation.
Parameters:
map - Set of MetadataMap types for which to return cursor data when evaluating dimension selections.

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


Copyright © 2003, Oracle. All Rights Reserved.