com.sas.storage.olap.sasmdx
Class ResultSet

com.sas.storage.olap.sasmdx.ResultSet
All Implemented Interfaces:
ResultSetInterface

public class ResultSet
implements ResultSetInterface

Contains the client side implementation for com.sas.storage.olap.ResultSetInterface. This implementation uses the IOM/OLAP interfaces provided by the SAS OLAP server.

See Also:
ResultSetInterface

Field Summary
protected  com.sas.iom.SASMDX.IMDDataSet _mdDataSet
          _mdDataSet for this result set
 
Fields inherited from interface com.sas.storage.olap.ResultSetInterface
DEFAULT_END_CELL, DEFAULT_ENDCELL
 
Method Summary
 void close()
          Close the ResultSetInterface
 long getCellCount()
          Get the cell count
 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.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.String getQueryStatement()
          Returns the query statement that defines this MultiDimensional dataset
 ResultSetMetadataInterface getResultSetMetadata()
          Get the resultSetMetadata for this result set
 boolean isReadOnly()
          This implementation will always return true.
 void setCells(long startCell, long endCell, java.lang.Object[] cellValues)
          This method is not supported
 void setFormattedCells(long startCell, long endCell, java.lang.String[] cellValues)
          This method is not supported
 

Field Detail

_mdDataSet

protected com.sas.iom.SASMDX.IMDDataSet _mdDataSet
_mdDataSet for this result set

Method Detail

getResultSetMetadata

public ResultSetMetadataInterface getResultSetMetadata()
                                                throws OLAPException
Get the resultSetMetadata for this result set

Specified by:
getResultSetMetadata in interface ResultSetInterface
Returns:
resultSetMetadata associated with the result set, can be null if not set yet
Throws:
OLAPException

getQueryStatement

public java.lang.String getQueryStatement()
                                   throws OLAPException
Returns the query statement that defines this MultiDimensional dataset

Specified by:
getQueryStatement in interface ResultSetInterface
Returns:
The query statement that defines this MultiDimensional dataset.
Throws:
OLAPException - if a database error occurs

isReadOnly

public boolean isReadOnly()
                   throws OLAPException
This implementation will always return true. The ResultSet is not updateable.

Specified by:
isReadOnly in interface ResultSetInterface
Returns:
true always
Throws:
OLAPException

getCells

public java.lang.Object[] getCells(long startCell,
                                   long endCell)
                            throws OLAPException
Returns the unformatted data slice beginning with the startCell (upper left corner ordinal) and ending with endCell (lower right corner ordinal). Because these parameters are used to identify the slice, not all cells between startCell and endCell are necessarily fetched.

Specified by:
getCells in interface ResultSetInterface
Parameters:
startCell - Ordinal position for starting cell
endCell - Ordinal position for endCell where -1 means all remaining cells
Returns:
The data in its raw format.
Throws:
OLAPException - if a database error occurs

getFormattedCells

public java.lang.String[] getFormattedCells(long startCell,
                                            long endCell)
                                     throws OLAPException
Returns the formatted data slice beginning with the startCell (upper left corner ordinal) and ending with endCell (lower right corner ordinal). Because these parameters are used to identify the slice, not all cells between startCell and endCell are necessarily fetched.

Specified by:
getFormattedCells in interface ResultSetInterface
Parameters:
startCell - Ordinal position for starting cell
endCell - Ordinal position for endCell where -1 means all remaining cells
Returns:
The formatted data.
Throws:
OLAPException - if a database error occurs

getCellCount

public long getCellCount()
                  throws OLAPException
Get the cell count

Specified by:
getCellCount in interface ResultSetInterface
Parameters:
return - number of cells
Returns:
The total number of cells defined in the ResultSet.
Throws:
OLAPException - if a database error occurs

setCells

public void setCells(long startCell,
                     long endCell,
                     java.lang.Object[] cellValues)
This method is not supported

Specified by:
setCells in interface ResultSetInterface
Parameters:
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.

setFormattedCells

public void setFormattedCells(long startCell,
                              long endCell,
                              java.lang.String[] cellValues)
This method is not supported

Specified by:
setFormattedCells in interface ResultSetInterface
Parameters:
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.

close

public void close()
           throws OLAPException
Close the ResultSetInterface

Specified by:
close in interface ResultSetInterface
Throws:
OLAPException - if a database error occurs



Copyright © 2009 SAS Institute Inc. All Rights Reserved.