com.sas.table
Interface StaticFormattedDataInterface

All Known Subinterfaces:
DataTableInterface, FormattedDataInterface
All Known Implementing Classes:
JDBCToDataTableAdapter

public interface StaticFormattedDataInterface

Defines an interface for accessing a table's formatted data. This will usually be implemented in tandem with the primary interface to tables, StaticTableInterface.

See Also:
StaticTableInterface, FormattedDataInterface, FormatInterface

Method Summary
 java.lang.String getFormattedCell(int rowIndex, int columnIndex)
          Returns the formatted value of a cell.
 java.lang.String[][] getFormattedCells(int startRowIndex, int startColumnIndex, int rowCount, int columnCount)
          Returns the formatted values for a block of cells.
 java.lang.String[] getFormattedColumn(int index)
          Returns the formatted values of all the cells in a column.
 java.lang.String[] getFormattedRow(int index)
          Returns the formatted values of all the cells in a row.
 

Method Detail

getFormattedCell

java.lang.String getFormattedCell(int rowIndex,
                                  int columnIndex)
                                  throws com.sas.table.TableException
Returns the formatted value of a cell. The cell is identified by the given row and column indices.

Parameters:
rowIndex - A one-based index that identifies the cell's row.
columnIndex - A one-based index that identifies the cell's column.
Returns:
The specified cell's formatted value.
Throws:
TableException - Thrown if the query can not be satisfied (e.g. i/o-failure).
java.lang.IndexOutOfBoundsException - Thrown if rowIndex is negative, zero, or greater than the number of rows. Thrown if columnIndex is negative, zero, or greater than the number of columns.
See Also:
getFormattedCells(int, int, int, int), getFormattedColumn(int), getFormattedRow(int)

getFormattedCells

java.lang.String[][] getFormattedCells(int startRowIndex,
                                       int startColumnIndex,
                                       int rowCount,
                                       int columnCount)
                                       throws com.sas.table.TableException
Returns the formatted values for a block of cells. The block is identified by the intersection of a range of rows with a range of columns. startRowIndex and rowCount define the start and extent of the row range while startColumnIndex and columnCount define the column range. The set of values is returned as a two-dimensional array, new Object[rowCount][colCount], with values[0][0] containing the formatted value of the cell at (startRowIndex, startColumnIndex).

Parameters:
startRowIndex - A one-based index that identifies the start of the row range.
startColumnIndex - A one-based index that identifies the start of the column range.
rowCount - The number of rows in the row range.
columnCount - The number of columns in the column range.
Returns:
The specified cells' values.
Throws:
TableException - Thrown if the query can not be satisfied (e.g. i/o-failure).
java.lang.IndexOutOfBoundsException - Thrown if startRowIndex or rowCount is negative, zero, or greater than the number of rows; except when getRowCount() has returned -1 -- in that case, the implementation should reduce rowCount appropriately and the caller should be prepared for a smaller returned array. Thrown if startColumnIndex or columnCount is negative, zero, or greater than the number of columns; except when getColumnCount() has returned -1 -- in that case, the implementation should reduce columnCount appropriately and the caller should be prepared for a smaller returned array.
See Also:
getFormattedCell(int, int), StaticTableInterface.getColumnCount(), StaticTableInterface.getRowCount()

getFormattedColumn

java.lang.String[] getFormattedColumn(int index)
                                      throws com.sas.table.TableException
Returns the formatted values of all the cells in a column. The column is identified by the given index. The set of values is returned as an array with each element of the array corresponding to a cell in the column.

Parameters:
index - A one-based index that identifies the column.
Returns:
The values of the specified column's cells.
Throws:
TableException - Thrown if the query can not be satisfied (e.g. i/o-failure).
java.lang.IndexOutOfBoundsException - Thrown if index is negative, zero, or greater than the number of columns.
See Also:
getFormattedCell(int, int)

getFormattedRow

java.lang.String[] getFormattedRow(int index)
                                   throws com.sas.table.TableException
Returns the formatted values of all the cells in a row. The row is identified by the given index. The set of values is returned as an array with each element of the array corresponding to a cell in the row.

Parameters:
index - A one-based index that identifies the row.
Returns:
The values of the specified row's cells.
Throws:
TableException - Thrown if the query can not be satisfied (e.g. i/o-failure).
java.lang.IndexOutOfBoundsException - Thrown if index is negative, zero, or greater than the number of rows.
See Also:
getFormattedCell(int, int)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.