|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.storage.olap.embedded.OLAPDataSet
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 OLAPDataSetInterface
OLAPException
- if cannot set the context type.public void setContextType(int contextType) throws OLAPException
OLAPDataSetInterface
setContextType
in interface OLAPDataSetInterface
OLAPException
- if cannot set the context type.public java.lang.Object getConnection() throws OLAPException
getConnection
in interface OLAPDataSetInterface
OLAPException
- if a database error occurspublic void setConnection(java.lang.Object connection) throws OLAPException
setConnection
in interface OLAPDataSetInterface
connection
- for this result set
OLAPException
- if the connection cannot be setpublic java.util.Locale getLocale() throws OLAPException
getLocale
in interface OLAPDataSetInterface
OLAPException
- if a database error occurspublic void setLocale(java.util.Locale locale) throws OLAPException
setLocale
in interface OLAPDataSetInterface
connection
- for this result set
OLAPException
- if the connection cannot be setpublic void executeQuery(java.lang.String queryStatement) throws OLAPException
OLAPDataSetInterface
executeQuery
in interface OLAPDataSetInterface
queryStatement
- The query statement
OLAPException
- if a database error occurspublic void executeQuery() throws OLAPException
OLAPDataSetInterface
executeQuery
in interface OLAPDataSetInterface
OLAPException
- if a database error occurspublic void setQueryStatement(java.lang.String queryStatement) throws OLAPException
OLAPDataSetInterface
setQueryStatement
in interface OLAPDataSetInterface
queryStatement
- The query to be executed
OLAPException
- if a database error occurspublic void setReadOnly(boolean readOnly) throws OLAPException
setReadOnly
in interface OLAPDataSetInterface
readOnly
- The updateable state of the OLAPDataSet.
OLAPException
- If a database-access error occurspublic MetadataInterface getDatabaseMetadata() throws OLAPException
getDatabaseMetadata
in interface OLAPDataSetInterface
OLAPException
- If a database error occurspublic ResultSetMetadataInterface getResultSetMetadata() throws OLAPException
ResultSetInterface
getResultSetMetadata
in interface ResultSetInterface
OLAPException
- if a database error occurspublic java.lang.String getQueryStatement() throws OLAPException
ResultSetInterface
getQueryStatement
in interface ResultSetInterface
OLAPException
- if a database error occurspublic boolean isReadOnly() throws OLAPException
isReadOnly
in interface ResultSetInterface
OLAPException
- If a database-access error occurspublic java.lang.Object[] getCells(long startCell, long endCell) throws OLAPException
ResultSetInterface
getCells
in interface ResultSetInterface
startCell
- 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 occurspublic java.lang.String[] getFormattedCells(long startCell, long endCell) throws OLAPException
ResultSetInterface
getFormattedCells
in interface ResultSetInterface
startCell
- 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 occurspublic long getCellCount() throws OLAPException
ResultSetInterface
getCellCount
in interface ResultSetInterface
OLAPException
- if a database error occurspublic void setCells(long startCell, long endCell, java.lang.Object[] cellValues) throws OLAPException
ResultSetInterface
setCells
in interface ResultSetInterface
startCell
- 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 occurspublic void setFormattedCells(long startCell, long endCell, java.lang.String[] cellValues) throws OLAPException
ResultSetInterface
setFormattedCells
in interface ResultSetInterface
startCell
- 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 occurspublic void close() throws OLAPException
ResultSetInterface
close
in interface ResultSetInterface
OLAPException
- if a database error occurspublic java.lang.String getCubeName() throws OLAPException
getCubeName
in interface OLAPDataSetInterface
OLAPException
- if the cubename cannot bepublic void setCubeName(java.lang.String cubeName) throws OLAPException
cubeName
-
OLAPException
public PerformanceTuning getPerformanceTuning() throws OLAPException
OLAPDataSetInterface
getPerformanceTuning
in interface OLAPDataSetInterface
OLAPException
public 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 |