|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.storage.olap.embedded.OLAPDataSet
@SASScope(value="ALL") public class OLAPDataSet
The OLAPDataSet together with the ResultSetInterface, ResultSetMetadataInterface, AxisInterface, TupleInterface, TupleElementInterface, and PerformanceTuningInterface make up the Data portion of the MD model. The ResultSetInterface is the central interface for setting the data and the structure or shape of that data. The structure of the data is defined by the ResultSetMetadataInterface, which is directly accessible via the ResultSetInterface. The AxisInterface, TupleInterface, and TupleElementInterface are the metadata components for the ResultSetMetadata. The OLAPDataSetInterface brings them all together. An OLAPDataSet object is the Java Data Model that should be attached to MD viewers, roughly equivalent to a JDBC RowSet. The OLAPDataSetInterface extends the functionality of the ResultSetInterface and PerformanceTuningInterface. Only one ResultSet is available within the OLAPDataSetInterface at any point in time. Therefore, if the reading of one ResultSet object is interleaved with the reading of another, each must have been generated by different OLAPDataSetInterface objects.
| 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 | |
|---|---|
OLAPDataSet()
|
|
OLAPDataSet(ResultSetInterface resultSet)
|
|
| Method Summary | |
|---|---|
void |
close()
Close the ResultSetInterface |
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()
This will always return null, since there is on connection in the embedded version |
int |
getContextType()
Get the context type. |
java.lang.String |
getCubeName()
Return the cubeName for the embedded model if it is set, otherwise null |
MetadataInterface |
getDatabaseMetadata()
This implementation returns null. |
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.util.Locale |
getLocale()
This will always return null, since there is on connection in the embedded version |
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()
This implementation will always return true. |
void |
setCells(long startCell,
long endCell,
java.lang.Object[] cellValues)
Sets the values for the cells. |
void |
setConnection(java.lang.Object connection)
This defines a connection to the SAS OLAP server. |
void |
setContextType(int contextType)
Set the context type. |
void |
setCubeName(java.lang.String cubeName)
Set the cube name for this olap dataset |
void |
setFormattedCells(long startCell,
long endCell,
java.lang.String[] cellValues)
Sets the formatted values for the cells. |
void |
setLocale(java.util.Locale locale)
This defines a connection to the SAS OLAP server. |
void |
setPerformanceTuning(PerformanceTuning pf)
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)
The readOnly state may only be set to true. |
| Constructor Detail |
|---|
public OLAPDataSet()
throws OLAPException
OLAPException
public OLAPDataSet(ResultSetInterface resultSet)
throws OLAPException
OLAPException| Method Detail |
|---|
public int getContextType()
throws OLAPException
OLAPDataSetInterface
getContextType in interface OLAPDataSetInterfaceOLAPException - if cannot set the context type.
public void setContextType(int contextType)
throws OLAPException
OLAPDataSetInterface
setContextType in interface OLAPDataSetInterfaceOLAPException - if cannot set the context type.
public java.lang.Object getConnection()
throws OLAPException
getConnection in interface OLAPDataSetInterfaceOLAPException - if a database error occurs
public void setConnection(java.lang.Object connection)
throws OLAPException
setConnection in interface OLAPDataSetInterfaceconnection - for this result set
OLAPException - if the connection cannot be set
public java.util.Locale getLocale()
throws OLAPException
getLocale in interface OLAPDataSetInterfaceOLAPException - if a database error occurs
public void setLocale(java.util.Locale locale)
throws OLAPException
setLocale in interface OLAPDataSetInterfaceconnection - for this result set
OLAPException - if the connection cannot be set
public void executeQuery(java.lang.String queryStatement)
throws OLAPException
OLAPDataSetInterface
executeQuery in interface OLAPDataSetInterfacequeryStatement - The query statement
OLAPException - if a database error occurs
public void executeQuery()
throws OLAPException
OLAPDataSetInterface
executeQuery in interface OLAPDataSetInterfaceOLAPException - if a database error occurs
public void setQueryStatement(java.lang.String queryStatement)
throws OLAPException
OLAPDataSetInterface
setQueryStatement in interface OLAPDataSetInterfacequeryStatement - The query to be executed
OLAPException - if a database error occurs
public void setReadOnly(boolean readOnly)
throws OLAPException
setReadOnly in interface OLAPDataSetInterfacereadOnly - The updateable state of the OLAPDataSet.
OLAPException - If a database-access error occurs
public MetadataInterface getDatabaseMetadata()
throws OLAPException
getDatabaseMetadata in interface OLAPDataSetInterfaceOLAPException - If a database error occurs
public ResultSetMetadataInterface getResultSetMetadata()
throws OLAPException
ResultSetInterface
getResultSetMetadata in interface ResultSetInterfaceOLAPException - if a database error occurs
public java.lang.String getQueryStatement()
throws OLAPException
ResultSetInterface
getQueryStatement in interface ResultSetInterfaceOLAPException - if a database error occurs
public boolean isReadOnly()
throws OLAPException
isReadOnly in interface ResultSetInterfaceOLAPException - If a database-access error occurs
public java.lang.Object[] getCells(long startCell,
long endCell)
throws OLAPException
ResultSetInterface
getCells in interface ResultSetInterfacestartCell - A zero-based ordinal position for the starting cell.endCell - A zero-based ordinal position for the ending cell where DEFAULT_ENDCELL can be used to
indicate all remaining cells
OLAPException - if a database error occurs
public java.lang.String[] getFormattedCells(long startCell,
long endCell)
throws OLAPException
ResultSetInterface
getFormattedCells in interface ResultSetInterfacestartCell - A zero-based ordinal position for the starting cell.endCell - A zero-based ordinal position for the ending cell where DEFAULT_ENDCELL can be used to
indicate all remaining cells
OLAPException - if a database error occurs
public long getCellCount()
throws OLAPException
ResultSetInterface
getCellCount in interface ResultSetInterfaceOLAPException - if a database error occurs
public void setCells(long startCell,
long endCell,
java.lang.Object[] cellValues)
throws OLAPException
ResultSetInterface
setCells in interface ResultSetInterfacestartCell - A zero-based ordinal position for the starting cell.endCell - A zero-based ordinal position for the ending cell.cellValues - Sets the values for the cells.
OLAPException - if a database error occurs
public void setFormattedCells(long startCell,
long endCell,
java.lang.String[] cellValues)
throws OLAPException
ResultSetInterface
setFormattedCells in interface ResultSetInterfacestartCell - A zero-based ordinal position for the starting cell.endCell - A zero-based ordinal position for the ending cell.cellValues - Sets the formatted values for the cells.
OLAPException - if a database error occurs
public void close()
throws OLAPException
ResultSetInterface
close in interface ResultSetInterfaceOLAPException - if a database error occurs
public java.lang.String getCubeName()
throws OLAPException
getCubeName in interface OLAPDataSetInterfaceOLAPException - if the cubename cannot be
public void setCubeName(java.lang.String cubeName)
throws OLAPException
cubeName -
OLAPException
public PerformanceTuning getPerformanceTuning()
throws OLAPException
OLAPDataSetInterface
getPerformanceTuning in interface OLAPDataSetInterfaceOLAPExceptionpublic void setPerformanceTuning(PerformanceTuning pf)
OLAPDataSetInterface
setPerformanceTuning in interface OLAPDataSetInterface
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||