|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.graphics.components.GraphOLAPDataSet
@SASScope(value="ALL") public class GraphOLAPDataSet
A class for sharing setup work between graph olap viewers that are sharing a single olap model. An instance of GraphOLAPDataSet should be shared among all graph viewers. Here is sample code for setting up a BarChart and a PieChart using the GraphOLAPDataSet:
OLAPDataSetInterface olap=...
GraphOLAPDataSet graphOlap=new GraphOLAPDataSet();
graphOlap.setDelegateModel(olap);
BarChartOLAPDataModel barData = new BarChartOLAPDataModel(graphOlap);
BarChart barChart=new BarChart(barData);
barChart.setActionProvider(actionProvider);
PieChartOLAPDataModel pieData = new PieChartOLAPDataModel(graphOlap);
PieChart pieChart=new PieChart(barData);
pieChart.setActionProvider(actionProvider);
This class delegates all OLAPDataSetInterface method calls to the delegate
model.
| Field Summary |
|---|
| Fields inherited from interface com.sas.storage.olap.OLAPDataSetInterface |
|---|
DEFAULT_CONTEXT_TYPE, NO_CONTEXT_TYPE |
| Fields inherited from interface com.sas.storage.olap.ResultSetInterface |
|---|
DEFAULT_END_CELL, DEFAULT_ENDCELL |
| Constructor Summary | |
|---|---|
GraphOLAPDataSet()
|
|
| Method Summary | |
|---|---|
void |
addContentsChangedListener(com.sas.collection.ContentsChangedListener listener)
Add a listener for com.sas.commands.ActionProviderEvent events. |
void |
close()
Close the ResultSetInterface |
void |
contentsChanged(com.sas.collection.ContentsChangedEvent e)
|
void |
executeQuery()
Executes the current query statement, which can be retrieved via the getQueryStatement() method. |
void |
executeQuery(java.lang.String queryStatement)
Executes the query statement that is passed in as a parameter. |
long |
getCellCount()
Returns the total number of cells defined in the ResultSet. |
java.lang.Object[] |
getCells(long startCell,
long endCell)
Returns the unformatted data slice beginning with the startCell (upper left corner ordinal) and ending with endCell (lower right corner ordinal). |
java.lang.Object |
getConnection()
Returns the connection to the OLAP server. |
int |
getContextType()
Get the context type. |
java.lang.String |
getCubeName()
Get the cubename associated with the current query |
MetadataInterface |
getDatabaseMetadata()
This method returns an instance of the MetadataInterface which defines all of the Cubes' metadata on the OLAP Server to which the model is connected. |
OLAPDataSetInterface |
getDelegateModel()
Get the delegate model. |
java.lang.String[] |
getFormattedCells(long startCell,
long endCell)
Returns the formatted data slice beginning with the startCell (upper left corner ordinal) and ending with endCell (lower right corner ordinal). |
java.lang.Object |
getGraphInfo()
Get olap graph information. |
static java.lang.Object |
getGraphInfo(OLAPDataSetInterface olap)
Get olap graph information given an OLAPDataSetInterface. |
java.util.Locale |
getLocale()
Returns the locale used for the session. |
PerformanceTuning |
getPerformanceTuning()
This method returns a performanceTuning object on the model. |
java.lang.String |
getQueryStatement()
Returns the most recent query statement. |
ResultSetMetadataInterface |
getResultSetMetadata()
Returns the metadata that defines the structure of the ResultSet |
boolean |
isReadOnly()
An instance of the OLAPDataSetInterface may be readOnly. |
void |
removeAllContentsChangedListeners()
Remove all ContentsChangedListener's. |
void |
removeContentsChangedListener(com.sas.collection.ContentsChangedListener listener)
Remove a listener for ContentsChanged events. |
void |
setCells(long startCell,
long endCell,
java.lang.Object[] cellValues)
Sets the values for the cells. |
void |
setConnection(java.lang.Object con)
Sets the connection to the OLAP server. |
void |
setContextType(int contextType)
Set the context type. |
void |
setDelegateModel(OLAPDataSetInterface olapDataSet)
Set the delegate model. |
void |
setFormattedCells(long startCell,
long endCell,
java.lang.String[] cellValues)
Sets the formatted values for the cells. |
void |
setLocale(java.util.Locale locale)
Sets the locale for the session object |
void |
setPerformanceTuning(PerformanceTuning performanceTuning)
Set the PerformanceTuning Object on this model. |
void |
setQueryStatement(java.lang.String queryStatement)
Sets the query statement, but does not execute the query. |
void |
setReadOnly(boolean readOnly)
Sets the updateable state of the OLAPDataSet. |
| Constructor Detail |
|---|
public GraphOLAPDataSet()
| Method Detail |
|---|
public void setDelegateModel(OLAPDataSetInterface olapDataSet)
olapDataSet -
OLAPExceptiongetDelegateModel()public OLAPDataSetInterface getDelegateModel()
public static java.lang.Object getGraphInfo(OLAPDataSetInterface olap)
throws OLAPException
olap -
OLAPException
public java.lang.Object getGraphInfo()
throws OLAPException
OLAPExceptionpublic void addContentsChangedListener(com.sas.collection.ContentsChangedListener listener)
addContentsChangedListener in interface com.sas.collection.ContentsChangedSourcelistener - public void removeContentsChangedListener(com.sas.collection.ContentsChangedListener listener)
removeContentsChangedListener in interface com.sas.collection.ContentsChangedSourcelistener - public void removeAllContentsChangedListeners()
public void contentsChanged(com.sas.collection.ContentsChangedEvent e)
contentsChanged in interface com.sas.collection.ContentsChangedListener
public void close()
throws OLAPException
ResultSetInterface
close in interface ResultSetInterfaceOLAPException
public void setCells(long startCell,
long endCell,
java.lang.Object[] cellValues)
throws OLAPException
ResultSetInterface
setCells in interface ResultSetInterfacestartCell - endCell - cellValues -
OLAPException
public void setPerformanceTuning(PerformanceTuning performanceTuning)
throws OLAPException
OLAPDataSetInterface
setPerformanceTuning in interface OLAPDataSetInterfaceperformanceTuning -
OLAPException
public java.lang.Object[] getCells(long startCell,
long endCell)
throws OLAPException
ResultSetInterface
getCells in interface ResultSetInterfacestartCell - endCell -
OLAPException - if a database error occurs
public long getCellCount()
throws OLAPException
ResultSetInterface
getCellCount in interface ResultSetInterfaceOLAPException - if a database error occurs
public java.lang.String[] getFormattedCells(long startCell,
long endCell)
throws OLAPException
ResultSetInterface
getFormattedCells in interface ResultSetInterfacestartCell - endCell -
OLAPException - if a database error occurs
public void setQueryStatement(java.lang.String queryStatement)
throws OLAPException
OLAPDataSetInterface
setQueryStatement in interface OLAPDataSetInterfacequeryStatement -
OLAPException
public void executeQuery()
throws OLAPException
OLAPDataSetInterface
executeQuery in interface OLAPDataSetInterfaceOLAPException
public boolean isReadOnly()
throws OLAPException
ResultSetInterface
isReadOnly in interface ResultSetInterfaceOLAPException - If a database-access error occurs
public java.lang.Object getConnection()
throws OLAPException
OLAPDataSetInterface
getConnection in interface OLAPDataSetInterfaceOLAPException - if a database error occurs
public void setConnection(java.lang.Object con)
throws OLAPException
OLAPDataSetInterface
setConnection in interface OLAPDataSetInterfacecon -
OLAPException
public void setReadOnly(boolean readOnly)
throws OLAPException
OLAPDataSetInterface
setReadOnly in interface OLAPDataSetInterfacereadOnly -
OLAPException
public void setContextType(int contextType)
throws OLAPException
OLAPDataSetInterface
setContextType in interface OLAPDataSetInterfacecontextType -
OLAPException
public void setFormattedCells(long startCell,
long endCell,
java.lang.String[] cellValues)
throws OLAPException
ResultSetInterface
setFormattedCells in interface ResultSetInterfacestartCell - endCell - cellValues -
OLAPException
public void executeQuery(java.lang.String queryStatement)
throws OLAPException
OLAPDataSetInterface
executeQuery in interface OLAPDataSetInterfacequeryStatement -
OLAPException
public java.lang.String getCubeName()
throws OLAPException
OLAPDataSetInterface
getCubeName in interface OLAPDataSetInterfaceOLAPException - if the cubename cannot be
public int getContextType()
throws OLAPException
OLAPDataSetInterface
getContextType in interface OLAPDataSetInterfaceOLAPException - if cannot set the context type.
public ResultSetMetadataInterface getResultSetMetadata()
throws OLAPException
ResultSetInterface
getResultSetMetadata in interface ResultSetInterfaceOLAPException - if a database error occurs
public MetadataInterface getDatabaseMetadata()
throws OLAPException
OLAPDataSetInterface
getDatabaseMetadata in interface OLAPDataSetInterfaceOLAPException - If a database error occurs
public java.util.Locale getLocale()
throws OLAPException
OLAPDataSetInterface
getLocale in interface OLAPDataSetInterfaceOLAPException - if a database error occurs
public PerformanceTuning getPerformanceTuning()
throws OLAPException
OLAPDataSetInterface
getPerformanceTuning in interface OLAPDataSetInterfaceOLAPException
public void setLocale(java.util.Locale locale)
throws OLAPException
OLAPDataSetInterface
setLocale in interface OLAPDataSetInterfacelocale -
OLAPException
public java.lang.String getQueryStatement()
throws OLAPException
ResultSetInterface
getQueryStatement in interface ResultSetInterfaceOLAPException - if a database error occurs
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||