|
Oracle™ Business Intelligence Beans Java API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.dss.dataSource.common.Query
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).
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 |
public static final java.lang.String QUERY_MANAGER
public static final java.lang.String NO_EVALUATE_ON_LOAD
Constructor Detail |
public Query()
Constructor for theQuery
.
Method Detail |
public void setQueryManager(QueryManager qmc) throws java.lang.Exception
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.qmc
- QueryManager instancejava.lang.Exception
- Error encountered when bringing back a query from persistence.public QueryManager getQueryManager()
QueryManager
object or null
.QueryRuntimeException
- thrown if the QueryManager is null.public void addQueryListener(QueryListener l)
Query
object. Note this method may throw a QueryRuntimeException.addQueryListener
in interface BaseManager
l
- The listener that is to be added.public void removeQueryListener(QueryListener l)
Query
.removeQueryListener
in interface BaseManager
l
- The listener that is to be removed.public void update() throws java.lang.Exception
Query
to execute pending operations in sequence.update
in interface BaseManager
java.lang.Exception
- If any middle tier exception occurs.public void cancel()
cancel
in interface BaseManager
public void close()
Query
middle tier references for proper clean up. Note this method may throw a QueryRuntimeException.public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
l
- The listener that is to be added.public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
l
- The listener that is to be removed.public void setAutoUpdate(boolean b) throws java.lang.Exception
setAutoUpdate
in interface BaseManager
b
- true
sends each operation for immediate processing; false
lets operations accumulate in a pending operations queue.All
- Any of the exceptions that are contained in the operations that are currently in the queue.public boolean isAutoUpdate()
isAutoUpdate
in interface BaseManager
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.public boolean isUpdatePending()
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
.
isUpdatePending
in interface BaseManager
true
if operations are pending; false
if there are no operations pending.public void setMeasures(java.lang.String[] measures)
measures
- The list of measures to use to make a default cube.public abstract java.lang.String[] getMeasures()
getMeasures
in interface MainManager
public void setDefaultColumnCount(int numCol)
numCol
- The number of dimensions to put on the column for default layouts.public int getDefaultColumnCount()
public void setDefaultRowCount(int numRow)
numRow
- The number of dimensions to put on the row for default layouts.public int getDefaultRowCount()
public void setDebugMode(boolean mode)
mode
- true
produces debug printouts on both client and server; false
does not produce debug printouts.public boolean isDebugMode()
true
indicates that debug printouts will be produced; false
indicates that debug printouts will not be produced.public void setPrintQueryState(boolean mode)
mode
- true
produces state printouts on server; false
does not produce state printouts.public boolean isPrintQueryState()
true
indicates that state printouts will be produced; false
indicates that state printouts will not be produced.public void setHierarchicalDrilling(boolean hierDrill)
setHierarchicalDrilling
in interface BaseManager
hierDrill
- true
indicates always use hierarchical drilling; false
indicates drilling is not restricted exclusively to hierarchical.public boolean isHierarchicalDrilling()
isHierarchicalDrilling
in interface BaseManager
true
if hierarchical drilling is used exclusively; false
if hierarchical drilling is not set exclusively.public void setAsymmetricDrilling(boolean asymmetric)
setAsymmetricDrilling
in interface BaseManager
asymmetric
- true
to use asymmetric drillingpublic boolean isAsymmetricDrilling()
isAsymmetricDrilling
in interface BaseManager
true
if asymmetric drilling is set; false
if asymmetric drilling is not set.public void setSeparatePage(boolean separate)
separate
- code>true to separate page cursors from the data cursorpublic boolean isSeparatePage()
true
if page cursors are separate false
if the entire query is one cursorpublic void setFetchSize(int size)
setFetchSize
in interface BaseManager
size
- integer indicating number of values to fetch per buffer read for cursors. -1 turns partial fetching off and fetches the entire cursorpublic int getFetchSize()
getFetchSize
in interface BaseManager
public void setFetchPageEdge(boolean fullfetch)
true
.setFetchPageEdge
in interface BaseManager
fullfetch
- if true
, the page edge is fully fetched. If not, partial fetching applies.public boolean getFetchPageEdge()
getFetchPageEdge
in interface BaseManager
true
if entire page edges are fetched.public void setSharePage(boolean b)
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.)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.public boolean isSharePage()
Query
should be shared among all listeners.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.public void setCurrentPage(int page, QDR qdrPage)
page
- Page number to share among listeners.qdrPage
- QDR version of the page.public void setCurrentPageAndFireEvent(int page, QDR qdrPage, DataChangedEvent e)
public int getCurrentPage()
public void setSuppressionState(int index, int suppress) throws java.lang.ArrayIndexOutOfBoundsException
Query
object when data is fetched.setSuppressionState
in interface BaseManager
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
.java.lang.ArrayIndexOutOfBoundsException
- If index
is invalid.DataDirector.NO_SUPPRESSION
, DataDirector.NA_SUPPRESSION
, DataDirector.ZERO_SUPPRESSION
, DataDirector.NA_ZERO_SUPPRESSION
, DataDirector.COLUMN_EDGE
, DataDirector.PAGE_EDGE
, DataDirector.ROW_EDGE
public int getSuppressColumns()
Query
object.oracle.dss.util.DataDirector
.DataDirector.NO_SUPPRESSION
, DataDirector.NA_SUPPRESSION
, DataDirector.ZERO_SUPPRESSION
, DataDirector.NA_ZERO_SUPPRESSION
public int getSuppressionState(int index) throws java.lang.ArrayIndexOutOfBoundsException
Query
object.getSuppressionState
in interface BaseManager
index
- A constant that represents the edge of interest. Valid constants are found in oracle.dss.util.DataDirector
.oracle.dss.util.DataDirector
.java.lang.ArrayIndexOutOfBoundsException
- If the index
parameter is invalid.DataDirector.NO_SUPPRESSION
, DataDirector.NA_SUPPRESSION
, DataDirector.ZERO_SUPPRESSION
, DataDirector.NA_ZERO_SUPPRESSION
, DataDirector.COLUMN_EDGE
, DataDirector.PAGE_EDGE
, DataDirector.ROW_EDGE
public void setSuppressionState(int[] suppress)
Query
when data is fetched.suppress
- Identifies the kind of suppression. Valid values are in oracle.dss.util.DataDirector
.DataDirector.NO_SUPPRESSION
, DataDirector.NA_SUPPRESSION
, DataDirector.ZERO_SUPPRESSION
, DataDirector.NA_ZERO_SUPPRESSION
public int[] getSuppressionState()
Query
object.Query
object. Valid values are in oracle.dss.util.DataDirector
.DataDirector.NO_SUPPRESSION
, DataDirector.NA_SUPPRESSION
, DataDirector.ZERO_SUPPRESSION
, DataDirector.NA_ZERO_SUPPRESSION
public void setSuppressColumns(int suppress)
suppress
- Identifies the kind of suppression. Valid constants are in oracle.dss.util.DataDirector
DataDirector.NO_SUPPRESSION
, DataDirector.NA_SUPPRESSION
, DataDirector.ZERO_SUPPRESSION
, DataDirector.NA_ZERO_SUPPRESSION
public void setSuppressRows(int suppress)
suppress
- Identifies the kind of suppression. Valid constants are in oracle.dss.util.DataDirector
.DataDirector.NO_SUPPRESSION
, DataDirector.NA_SUPPRESSION
, DataDirector.ZERO_SUPPRESSION
, DataDirector.NA_ZERO_SUPPRESSION
public int getSuppressRows()
Query
object.oracle.dss.util.DataDirector
.DataDirector.NO_SUPPRESSION
, DataDirector.NA_SUPPRESSION
, DataDirector.ZERO_SUPPRESSION
, DataDirector.NA_ZERO_SUPPRESSION
public void setName(java.lang.String n)
n
- The name of this data source.public java.lang.String getName()
public CubeDataDirector createCubeDataDirector()
DataDirector
that manipulates the Query
in a cube-like or multidimensional way. Used for OLAP views.createCubeDataDirector
in interface DataSource
CubeDataDirector
interface.CubeDataDirector
public RelationalDataDirector createRelationalDataDirector()
DataDirector
that manipulates the Query
in a relational way. Used for relational views.createRelationalDataDirector
in interface DataSource
RelationalDataDirector
interface.RelationalDataDirector
public LayoutAccess createLayoutAccess()
LayoutAccess
interface. This object can make use of the LayoutContext
object, which is also implemented by this Query
, for state and layout manipulation services.createLayoutAccess
in interface LayoutContext
LayoutAccess
interface.public LayoutAccess createCubeLayoutAccess()
LayoutAccess
interface that presents data with a cube layout.createCubeLayoutAccess
in interface LayoutContext
LayoutAccess
interface.public LayoutAccess createRelationalLayoutAccess()
LayoutAccess
interface that presents data with a relational (table) layout.createRelationalLayoutAccess
in interface LayoutContext
LayoutAccess
interface.public boolean applyLayoutAccess(LayoutAccess la, boolean update)
Query
with the changed layout information in the specified LayoutAccess
object. Note this method may throw a QueryRuntimeException.applyLayoutAccess
in interface LayoutContext
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.public QueryAccess createQueryAccess()
QueryContext
object, which is also implemented by this Query, for state and Selection
evaluation services.createQueryAccess
in interface QueryContext
QueryAccess
interface.public boolean applyQueryAccess(QueryAccess qa, boolean update)
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.applyQueryAccess
in interface QueryContext
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.true
if the update is successful; false
if the update is not successful.public void setEvaluateCursor(boolean evalCursor) throws QueryException, InvalidStepArgException, SelectionException, MetadataManagerException
true
. If this setting is changed to false
, then the clone(boolean) method bypasses cursor evaluation when copying a Query
.setEvaluateCursor
in interface BaseManager
evalCursor
- Indicates whether cursors should be evaluated for a Query
.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.public boolean isEvaluateCursor()
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).isEvaluateCursor
in interface BaseManager
true
if cursor evaluation should be performed; false
if cursor evaluation should be bypassed.public DataMap getDataMap()
DataMap
object that represents all data types that have been requested by all current clients of this Query
.getDataMap
in interface MainManager
DataMap
that contains all the desired data map types.public MetadataMap getMetadataMap(java.lang.String dimension)
MetadataMap
object that represents all metadata map types that have been requested by all current clients of this Query
for the specified dimension.getMetadataMap
in interface MainManager
dimension
- The dimension for which to return the map; null
if default.MetadataMap
object that contains all desired metadata map types.public MetadataMap getMetadataMap(int edge)
MetadataMap
object that represents all metadata map types that have been requested by all current clients of this Query
for the specified edge.getMetadataMap
in interface MainManager
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
.DataDirector.COLUMN_EDGE
, DataDirector.PAGE_EDGE
, DataDirector.ROW_EDGE
public abstract java.lang.String getDatabaseName()
public void setXMLValidated(boolean validate)
Query
validates XML against its DTD.validate
- true
to have XML validated, false
to have the Query
apply the XML without testing for validity.public boolean isXMLValidated()
Query
validates XML against its DTD.true
if the Query
validates XML, false
if the Query
applies XML without validation.public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Query
object.clone
in interface BaseManager
Query
.java.lang.CloneNotSupportedException
- If the clone cannot be createdpublic java.lang.Object clone(boolean evaluateCursor) throws java.lang.CloneNotSupportedException
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).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.Query
.java.lang.CloneNotSupportedException
- If a Query
cannot be cloned.isEvaluateCursor()
, setEvaluateCursor(boolean)
public abstract getMetadataManager()
public void setThinBeanName(java.lang.String thinBeanName)
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.setThinBeanName
in interface ThinBean
thinBeanName
- The name of the ThinBean
.public java.lang.String getThinBeanName()
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.getThinBeanName
in interface ThinBean
ThinBean
.
|
Oracle™ Business Intelligence Beans Java API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |