Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 2 (11.1.2.0.0)

E17492-01

oracle.dss.dataView
Interface Model

All Known Subinterfaces:
GaugeModel, GraphModel
All Known Implementing Classes:
GaugeModelAdapter, GraphModelAdapter, ModelAdapter

public interface Model

Methods and fields required for a model. Most developers will use the BI Beans implementations of this interface and of the interfaces that extend this interface.


Field Summary
static int VIEW_PAGE_FIRST
          Go to the first page.
static int VIEW_PAGE_LAST
          Go to the last page.
static int VIEW_PAGE_NEXT
          Go to the next page.
static int VIEW_PAGE_PREVIOUS
          Go to the previous page.
 
Method Summary
 void addDataListener(DataListener l)
          Registers a data listener with this model.
 void addModelListener(ModelListener l)
           
 boolean canDrill(java.lang.Object source, int edge, int layer, int slice, int flags)
           
 boolean canPivot(java.lang.Object source, int fromEdge, int toEdge, int fromLayer, int toLayer, int flags)
           
 boolean drillGestureHappened(java.lang.Object source, int edge, int layer, int slice, int flags)
           
 ControllerActions getControllerActions()
           
 DataAccess getDataAccess()
          Get the data access for this view.
 DataDirector getDataDirector()
          Retrieves the data director for this view.
 DataSource getDataSource()
          Retrieves the data source for this view.
 ErrorHandler getErrorHandler()
           
 boolean isDrillingEnabled()
          Indicates whether drilling is allowed in this view.
 boolean pageChangeHappened(java.lang.Object source, int pos)
           
 boolean pageChangeHappened(java.lang.Object source, int[] hPos, int maxLayerSpecified)
           
 boolean pivotGestureHappened(java.lang.Object source, int fromEdge, int toEdge, int fromLayer, int toLayer, int flags)
           
 void removeDataListener(DataListener l)
          Removes the data listener from this model.
 void removeModelListener(ModelListener l)
           
 void setDataAccess(DataAccess dp)
          Specifies the data access for this view.
 void setDataDirector(DataDirector dd)
          Specifies the data director for this view.
 void setDataSource(DataSource ds)
          Specifies the data source for this view.
 void setDrillingEnabled(boolean b)
          Specifies whether drilling is allowed in this view.
 void setErrorHandler(ErrorHandler eh)
           
 void viewDataChanged(DataChangedEvent e)
           
 

Field Detail

VIEW_PAGE_FIRST

static final int VIEW_PAGE_FIRST
Go to the first page.

See Also:
Constant Field Values

VIEW_PAGE_LAST

static final int VIEW_PAGE_LAST
Go to the last page.

See Also:
Constant Field Values

VIEW_PAGE_PREVIOUS

static final int VIEW_PAGE_PREVIOUS
Go to the previous page.

See Also:
Constant Field Values

VIEW_PAGE_NEXT

static final int VIEW_PAGE_NEXT
Go to the next page.

See Also:
Constant Field Values
Method Detail

addModelListener

void addModelListener(ModelListener l)
Parameters:
l - The listener to add.
For internal use only. Application developers should not use this
Registers a model listener with this model. A model listener listens for changes in the availability of data and for changes in the underlying data. The view calls this method to register itself as a listener. Application developers do not need to call this method.

removeModelListener

void removeModelListener(ModelListener l)
Parameters:
l - The listener to remove.
For internal use only. Application developers should not use this
Removes a model listener from the list of listeners for this model. The view calls this method to remove itself from the list of listeners. Application developers do not need to call this method.

addDataListener

void addDataListener(DataListener l)
Registers a data listener with this model. A data listener listens for changes that a user requests in the data, such as drilling and pivoting.

Parameters:
l - The listener to add.

removeDataListener

void removeDataListener(DataListener l)
Removes the data listener from this model.

Parameters:
l - The listener to remove.

pivotGestureHappened

boolean pivotGestureHappened(java.lang.Object source,
                             int fromEdge,
                             int toEdge,
                             int fromLayer,
                             int toLayer,
                             int flags)
                             throws EdgeOutOfRangeException,
                                    LayerOutOfRangeException,
                                    DataDirectorException
Parameters:
source - The source of any events that this method fires. The DataView passes this as this parameter.
fromEdge - A constant that represents the edge to pivot from, such as COLUMN_EDGE. Edge constants are listed in the See Also section.
toEdge - A constant that represents the edge to pivot to.
fromLayer - The layer to pivot from. The layer identifies the location of the dimension or dimension member on the edge. Zero is the outer-most layer on the edge.
toLayer - The layer to pivot to.
flags - A constant that represents the type of pivot to perform, such as PIVOT_SWAP or PIVOT_MOVE_BEFORE. The constants are listed in the See Also section, and they begin with PIVOT_.
Returns:
true if the data director performs the pivot, false if the pivot is not performed for some reason.
Throws:
EdgeOutOfRangeException - If either edge parameter is too large.
LayerOutOfRangeException - If either layer parameter is negative or too large.
DataDirectorException - If a data provider error occurs.
See Also:
DataDirector.COLUMN_EDGE, DataDirector.ROW_EDGE, DataDirector.PAGE_EDGE, DataDirector.PIVOT_EDGES, DataDirector.PIVOT_MOVE_AFTER, DataDirector.PIVOT_MOVE_BEFORE, *
For internal use only. Application developers should not use this
Pivots data. This method first fires a viewPivotRequesting event. If the event is not consumed, this method then calls the pivot method in the data director, to pivot the data in the data source. After the call to the data director, this method fires a viewPivotRequested event.

The view calls this method when a pivot gesture is detected in the UI.


canPivot

boolean canPivot(java.lang.Object source,
                 int fromEdge,
                 int toEdge,
                 int fromLayer,
                 int toLayer,
                 int flags)
                 throws EdgeOutOfRangeException,
                        LayerOutOfRangeException,
                        DataDirectorException
Parameters:
source - The source of any events that this method fires. The DataView passes this as this parameter.
fromEdge - A constant that represents the edge to pivot from, such as COLUMN_EDGE. Edge constants are listed in the See Also section.
toEdge - A constant that represents the edge to pivot to.
fromLayer - The layer to pivot from. The layer identifies the location of the dimension or dimension member on the edge. Zero is the outer-most dimension on the edge.
toLayer - The layer to pivot to.
flags - A constant that represents the type of pivot to perform, such as PIVOT_SWAP or PIVOT_MOVE_BEFORE. The constants are listed in the See Also section, and they all begin with PIVOT_.
Returns:
true if the pivot operation is legal, false if not.
Throws:
EdgeOutOfRangeException - If either edge parameter is too large.
LayerOutOfRangeException - If either layer parameter is negative or too large.
DataDirectorException - If a data provider error occurs.
See Also:
DataDirector.COLUMN_EDGE, DataDirector.ROW_EDGE, DataDirector.PAGE_EDGE, DataDirector.PIVOT_EDGES, DataDirector.PIVOT_MOVE_AFTER, DataDirector.PIVOT_MOVE_BEFORE, DataDirector.PIVOT_SWAP
For internal use only. Application developers should not use this
Indicates whether a pivot operation is legal. This method calls the pivotOK method in the data director, to pivot the data in the data source. The view calls this method when a pivot gesture is detected in the UI.

drillGestureHappened

boolean drillGestureHappened(java.lang.Object source,
                             int edge,
                             int layer,
                             int slice,
                             int flags)
                             throws EdgeOutOfRangeException,
                                    LayerOutOfRangeException,
                                    SliceOutOfRangeException,
                                    DataDirectorException
Parameters:
source - The source of any events that this method fires. The DataView passes this as this parameter.
edge - A constant that represents the edge to drill, such as COLUMN_EDGE. Edge constants are listed in the See Also secton.
layer - The layer to drill. The layer identifies the location of the dimension or dimension member on the edge. Zero is the outer-most layer on the edge.
slice - The slice to drill. The slice is zero-based. Each layer member in the innermost dimension has a unique slice. In outer layers, any slice that the outer layer spans can be used.
flags - A constant that represents the type of drill to perform, such as DRILLSTATE_DRILLABLE to drill down in data. Drill constants are listed in the See Also section. They begin with DRILLSTATE_.
Returns:
true if the data director performs the drill, false if not.
Throws:
EdgeOutOfRangeException - If edge is too large.
LayerOutOfRangeException - If layer is negative or too large.
SliceOutOfRangeException - If slice is negative or too large.
DataDirectorException - If a data provider error occurs.
See Also:
DataDirector.COLUMN_EDGE, DataDirector.ROW_EDGE, DataDirector.PAGE_EDGE, DataDirector.DRILLSTATE_DRILLABLE, DataDirector.DRILLSTATE_IS_DRILLED, DataDirector.DRILLSTATE_NOT_DRILLABLE
For internal use only. Application developers should not use this
Drills in data. The view calls this method when a drill gesture is detected in the UI.

canDrill

boolean canDrill(java.lang.Object source,
                 int edge,
                 int layer,
                 int slice,
                 int flags)
                 throws EdgeOutOfRangeException,
                        LayerOutOfRangeException,
                        SliceOutOfRangeException,
                        DataDirectorException
Parameters:
source - The source of any events that this method fires. The DataView passes this as this parameter.
edge - A constant that represents the edge to drill, such as COLUMN_EDGE. Edge constants listed in the See Also section.
layer - The layer to drill. The layer identifies the location of the dimension or dimension member on the edge. Zero is the outer-most layer on the edge.
slice - The slice to drill. The slice is zero-based. Each layer member in the innermost layer has a unique slice. In outer layers, any slice that the outer layer spans can be used.
flags - A constant that represents the type of drill to perform, such as DRILLSTATE_DRILLABLE to drill down in data. Drill constants are listed in the See Also section. They begin with DRILLSTATE_.
Returns:
true if the drill operation is legal, false if not.
Throws:
EdgeOutOfRangeException - If edge is too large.
DepthOutOfRangeException - If depth is negative or too large.
SliceOutOfRangeException - If slice is negative or too large.
DataDirectorException - If a data provider error occurs.
LayerOutOfRangeException
See Also:
DataDirector.COLUMN_EDGE, DataDirector.ROW_EDGE, DataDirector.PAGE_EDGE, DataDirector.DRILLSTATE_DRILLABLE, DataDirector.DRILLSTATE_IS_DRILLED, DataDirector.DRILLSTATE_NOT_DRILLABLE
For internal use only. Application developers should not use this
Indicates whether a drill gesture is legal. The view calls this method when a drill gesture is detected in the UI.

pageChangeHappened

boolean pageChangeHappened(java.lang.Object source,
                           int pos)
                           throws SliceOutOfRangeException,
                                  DataDirectorException
Parameters:
source - The source of any event that this method fires.
pos - A constant that represents the first page, last page, next page, or previous page. Constants are listed in the See Also section.
Returns:
true if the page is changed, false if not.
Throws:
SliceOutOfRangeException - If page is negative or too large.
DataDirectorException - If a data provider error occurs.
See Also:
VIEW_PAGE_FIRST, VIEW_PAGE_LAST, VIEW_PAGE_NEXT, VIEW_PAGE_PREVIOUS
For internal use only. Application developers should not use this
Changes the current page.

pageChangeHappened

boolean pageChangeHappened(java.lang.Object source,
                           int[] hPos,
                           int maxLayerSpecified)
                           throws LayerOutOfRangeException,
                                  SliceOutOfRangeException,
                                  DataDirectorException
Parameters:
source - The source of any event that this method fires.
hPos - An array of relative indices that indicate the set of new values to give to the various layers that make up the target slice.
maxLayerSpecified - The maximum index into hPos (layer) that the call should use in making the slice change.
Returns:
true if the page is changed, false if not.
Throws:
LayerOutOfRangeException - If there are too many layers.
SliceOutOfRangeException - If page is negative or too large.
DataDirectorException - If a data provider error occurs.
For internal use only. Application developers should not use this
Changes the current page. The view calls this method when a page change gesture is detected in the UI.

setDataSource

void setDataSource(DataSource ds)
Specifies the data source for this view.

Parameters:
ds - The data source for this view.

getDataSource

DataSource getDataSource()
Retrieves the data source for this view.

Returns:
The data source for this view. This method can return null if no data source has been specified for this view.

setDataDirector

void setDataDirector(DataDirector dd)
Specifies the data director for this view. The data director is the part of the data source that manipulates the data.

Parameters:
dd - A DataDirector implementation that has been initialized.

getDataDirector

DataDirector getDataDirector()
Retrieves the data director for this view. The data director is the part of the data source that manipulates the data.

Returns:
The data director for this view.

setDataAccess

void setDataAccess(DataAccess dp)
Specifies the data access for this view. The data access is the part of the data source that feeds data to the view. It is, essentially, a cursor of data.

Parameters:
dp - An implementation of the DataAccess interface.

getDataAccess

DataAccess getDataAccess()
Get the data access for this view. The data access is the part of the data source that feeds data to the view. It is, essentially, a cursor of data.

Returns:
The DataAccess for this view. This method can return null if no data access has been specified for this view.

setDrillingEnabled

void setDrillingEnabled(boolean b)
Specifies whether drilling is allowed in this view.

Parameters:
b - true to enable drilling, false to disable drilling.

isDrillingEnabled

boolean isDrillingEnabled()
Indicates whether drilling is allowed in this view.

Returns:
true if drilling is enabled, false if not.

setErrorHandler

void setErrorHandler(ErrorHandler eh)
Parameters:
eh - The error handler for the view.
See Also:
Dataview.addErrorHandler(oracle.dss.util.ErrorHandler)
For internal use only. Application developers should not use this
Specifies the error handler for this view. The view calls this method when an error handler is specified for the view. Application developers should not call this method. Instead, to set an error handler, call the addErrorHandler method of the view.

getErrorHandler

ErrorHandler getErrorHandler()
Returns:
The error handler. Can return null if no error handler has been specified for the view.
For internal use only. Application developers should not use this
Retrieves the error handler for this view.

getControllerActions

ControllerActions getControllerActions()
Returns:
The current ControllerActions object.
For internal use only. Application developers should not use this
Retrieves the object that implements the ControllerActions interface.

viewDataChanged

void viewDataChanged(DataChangedEvent e)
Parameters:
e - Information about the data change.
For internal use only. Application developers should not use this
Notify listeners of changes to the data or metadata.

Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 2 (11.1.2.0.0)

E17492-01

Copyright © 1997, 2011, Oracle. All rights reserved.