|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.graphics.components.GraphOLAPDataSet
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
-
OLAPException
getDelegateModel()
public OLAPDataSetInterface getDelegateModel()
public static java.lang.Object getGraphInfo(OLAPDataSetInterface olap) throws OLAPException
olap
-
OLAPException
public java.lang.Object getGraphInfo() throws OLAPException
OLAPException
public void addContentsChangedListener(com.sas.collection.ContentsChangedListener listener)
addContentsChangedListener
in interface com.sas.collection.ContentsChangedSource
listener
- public void removeContentsChangedListener(com.sas.collection.ContentsChangedListener listener)
removeContentsChangedListener
in interface com.sas.collection.ContentsChangedSource
listener
- 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 ResultSetInterface
OLAPException
public void setCells(long startCell, long endCell, java.lang.Object[] cellValues) throws OLAPException
ResultSetInterface
setCells
in interface ResultSetInterface
startCell
- endCell
- cellValues
-
OLAPException
public void setPerformanceTuning(PerformanceTuning performanceTuning) throws OLAPException
OLAPDataSetInterface
setPerformanceTuning
in interface OLAPDataSetInterface
performanceTuning
-
OLAPException
public java.lang.Object[] getCells(long startCell, long endCell) throws OLAPException
ResultSetInterface
getCells
in interface ResultSetInterface
startCell
- endCell
-
OLAPException
- if a database error occurspublic long getCellCount() throws OLAPException
ResultSetInterface
getCellCount
in interface ResultSetInterface
OLAPException
- if a database error occurspublic java.lang.String[] getFormattedCells(long startCell, long endCell) throws OLAPException
ResultSetInterface
getFormattedCells
in interface ResultSetInterface
startCell
- endCell
-
OLAPException
- if a database error occurspublic void setQueryStatement(java.lang.String queryStatement) throws OLAPException
OLAPDataSetInterface
setQueryStatement
in interface OLAPDataSetInterface
queryStatement
-
OLAPException
public void executeQuery() throws OLAPException
OLAPDataSetInterface
executeQuery
in interface OLAPDataSetInterface
OLAPException
public boolean isReadOnly() throws OLAPException
ResultSetInterface
isReadOnly
in interface ResultSetInterface
OLAPException
- If a database-access error occurspublic java.lang.Object getConnection() throws OLAPException
OLAPDataSetInterface
getConnection
in interface OLAPDataSetInterface
OLAPException
- if a database error occurspublic void setConnection(java.lang.Object con) throws OLAPException
OLAPDataSetInterface
setConnection
in interface OLAPDataSetInterface
con
-
OLAPException
public void setReadOnly(boolean readOnly) throws OLAPException
OLAPDataSetInterface
setReadOnly
in interface OLAPDataSetInterface
readOnly
-
OLAPException
public void setContextType(int contextType) throws OLAPException
OLAPDataSetInterface
setContextType
in interface OLAPDataSetInterface
contextType
-
OLAPException
public void setFormattedCells(long startCell, long endCell, java.lang.String[] cellValues) throws OLAPException
ResultSetInterface
setFormattedCells
in interface ResultSetInterface
startCell
- endCell
- cellValues
-
OLAPException
public void executeQuery(java.lang.String queryStatement) throws OLAPException
OLAPDataSetInterface
executeQuery
in interface OLAPDataSetInterface
queryStatement
-
OLAPException
public java.lang.String getCubeName() throws OLAPException
OLAPDataSetInterface
getCubeName
in interface OLAPDataSetInterface
OLAPException
- if the cubename cannot bepublic int getContextType() throws OLAPException
OLAPDataSetInterface
getContextType
in interface OLAPDataSetInterface
OLAPException
- if cannot set the context type.public ResultSetMetadataInterface getResultSetMetadata() throws OLAPException
ResultSetInterface
getResultSetMetadata
in interface ResultSetInterface
OLAPException
- if a database error occurspublic MetadataInterface getDatabaseMetadata() throws OLAPException
OLAPDataSetInterface
getDatabaseMetadata
in interface OLAPDataSetInterface
OLAPException
- If a database error occurspublic java.util.Locale getLocale() throws OLAPException
OLAPDataSetInterface
getLocale
in interface OLAPDataSetInterface
OLAPException
- if a database error occurspublic PerformanceTuning getPerformanceTuning() throws OLAPException
OLAPDataSetInterface
getPerformanceTuning
in interface OLAPDataSetInterface
OLAPException
public void setLocale(java.util.Locale locale) throws OLAPException
OLAPDataSetInterface
setLocale
in interface OLAPDataSetInterface
locale
-
OLAPException
public java.lang.String getQueryStatement() throws OLAPException
ResultSetInterface
getQueryStatement
in interface ResultSetInterface
OLAPException
- if a database error occurs
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |