com.sas.table
Interface TableInterface

All Superinterfaces:
StaticTableInterface
All Known Subinterfaces:
ColumnTemplateTableInterface, DataTableInterface, FreeformTableInterface, RowTemplateTableInterface
All Known Implementing Classes:
JDBCToDataTableAdapter

public interface TableInterface
extends StaticTableInterface

Defines an interface for modifying a table's cells.

See Also:
ColumnLabelInterface, RowLabelInterface

Method Summary
 boolean isCellsModifiable()
          Indicates whether cells can be modified.
 boolean isMultipleColumnUpdateSupported()
          Indicates whether more than one column can be simultaneously updated.
 boolean isMultipleRowUpdateSupported()
          Indicates whether more than one row can be simultaneously updated.
 void setCell(int rowIndex, int columnIndex, java.lang.Object value)
          Specifies the value of a cell.
 void setCells(int startRowIndex, int startColumnIndex, int rowCount, int columnCount, java.lang.Object[][] values)
          Specifies the values for a block of cells.
 void setColumn(int index, java.lang.Object[] values)
          Specifies the values of all the cells in a column.
 void setRow(int index, java.lang.Object[] values)
          Specifies the values of all the cells in a row.
 
Methods inherited from interface com.sas.table.StaticTableInterface
countColumns, countRows, getCell, getCellClass, getCellClasses, getCells, getColumn, getColumnCount, getRow, getRowCount
 

Method Detail

isCellsModifiable

boolean isCellsModifiable()
Indicates whether cells can be modified. Normally the act of implementing this interface would indicate that cells can be modified, but some implementations may have read-only modes.

Returns:
true if cells can be modified, and false otherwise.

isMultipleRowUpdateSupported

boolean isMultipleRowUpdateSupported()
Indicates whether more than one row can be simultaneously updated. When false, setColumn() can not be used, nor can setCells() be called with a range that spans multiple rows.

Returns:
true if multiple rows can be simultaneously updated, and false otherwise.

isMultipleColumnUpdateSupported

boolean isMultipleColumnUpdateSupported()
Indicates whether more than one column can be simultaneously updated. When false, setRow() can not be used, nor can setCells() be called with a range that spans multiple columns.

Returns:
true if multiple columns can be simultaneously updated, and false otherwise.

setCell

void setCell(int rowIndex,
             int columnIndex,
             java.lang.Object value)
             throws com.sas.table.TableException
Specifies the 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.
value - The cell's new 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:
setCells(int, int, int, int, java.lang.Object[][]), setColumn(int, java.lang.Object[]), setRow(int, java.lang.Object[])

setCells

void setCells(int startRowIndex,
              int startColumnIndex,
              int rowCount,
              int columnCount,
              java.lang.Object[][] values)
              throws com.sas.table.TableException
Specifies the 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 specified as a two-dimensional array, new Object[rowCount][colCount], with values[0][0] containing the value of the cell at (startRowIndex, startColumnIndex). Usually, the implementation will require that the class of each new value match what's returned by getCellClass() for the corresponding cell, but a common exception to this will be implementations that allow values to be instances of com.sas.MissingValues.

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.
values - The new values for each cell in the block.
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. Thrown if startColumnIndex or columnCount is negative, zero, or greater than the number of columns.
See Also:
setCell(int, int, java.lang.Object)

setColumn

void setColumn(int index,
               java.lang.Object[] values)
               throws com.sas.table.TableException
Specifies the values of all the cells in a column. The column is identified by the given index. The set of values is specified as an array with each element of the array corresponding to a cell in the column. Usually, the implementation will require that the class of each new value match what's returned by getCellClass() for the corresponding cell, but a common exception to this will be implementations that allow values to be instances of com.sas.MissingValues.

Parameters:
index - A one-based index that identifies the column.
values - The new values for each cell in the column.
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:
setCell(int, int, java.lang.Object)

setRow

void setRow(int index,
            java.lang.Object[] values)
            throws com.sas.table.TableException
Specifies the values of all the cells in a row. The row is identified by the given index. The set of values is specified as an array with each element of the array corresponding to a cell in the row. Usually, the implementation will require that the class of each new value match what's returned by getCellClass() for the corresponding cell, but a common exception to this will be implementations that allow values to be instances of com.sas.MissingValues.

Parameters:
index - A one-based index that identifies the row.
values - The new values for each cell in the row.
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:
setCell(int, int, java.lang.Object)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.