IBM Rational Functional Tester
Version 8.1.1000
IBM Rational Functional Tester API Reference

Project Version 2.3

com.rational.test.ft.vp
Interface ITestDataTable

All Superinterfaces:
ITestData

public interface ITestDataTable
extends ITestData

Represents a table of test data.

Since:
RFT1.0

Method Summary
 void addComparisonRegion(ITestDataTableRegion comparisonRegion)
          Adds the supplied comparison region to the set.
 java.lang.Object getCell(int row, int column)
          Returns the contents of the cell at the specified column and row index.
 int getColumnCount()
          Returns the number of columns in the table.
 java.lang.Object getColumnHeader(int column)
          Returns the table-column header corresponding to the specified column index.
 int getColumnIndex(Column column)
          Converts a column specification to a zero-based column index.
 ITestDataTableRegion[] getComparisonRegions()
          Returns the set of comparison regions to be used in a comparison of table data.
 int[] getKeyColumns()
          Returns the indices of the columns that contain key fields.
 int[] getKeyRows()
          Returns the indices of the rows that contain key fields.
 int getRowCount()
          Returns the number of rows in the table.
 java.lang.Object getRowHeader(int row)
          Returns the table row header corresponding to the specified row index.
 int getRowIndex(Row row)
          Converts a row specification to a zero-based row index.
 boolean hasColumnHeaders()
          Returns true if the corresponding table has column headers.
 boolean hasKeyColumns()
          Returns true if the table has columns that contain key data fields.
 boolean hasKeyRows()
          Returns true if the table has rows that contain key data fields.
 boolean hasRowHeaders()
          Returns true if the corresponding table has row headers.
 boolean isCompareBothByLeftRegions()
          Specifies whether the comparison should be performed by using the comparison regions of both left and right values or just the left.
 boolean isCompareColumnHeaders()
          Returns true if the column headers should be compared.
 boolean isCompareRowHeaders()
          Returns true if the row headers should be compared.
 void removeComparisonRegion(ITestDataTableRegion comparisonRegion)
          Removes the supplied comparison region from the region set associated with this table data object.
 void setCell(int row, int column, java.lang.Object value)
          Updates the contents of the cell at the specified column and row index.
 void setColumnHeader(int column, java.lang.Object columnHeader)
          Updates a column header associated with the table.
 void setColumnHeaders(java.lang.Object[] columnHeaders)
          Defines the column headers associated with the table.
 void setCompareBothByLeftRegions(boolean compareBothByLeftRegions)
          Specifies whether the comparison should be performed by using the comparison regions of both left and right values or just the left.
 void setCompareColumnHeaders(boolean compareColumnHeaders)
          Specifies whether the column headers should be compared.
 void setCompareRowHeaders(boolean compareRowHeaders)
          Specifies if the row headers should be compared.
 void setComparisonRegions(ITestDataTableRegion[] comparisonRegions)
          Replaces the existing selected regions with the supplied comparison regions.
 void setKeyColumns(int[] keyColumns)
          Specifies the indices of the columns that contain key fields.
 void setKeyRows(int[] keyRows)
          Specifies the indices of the rows that are used for key row specifications.
 void setRowHeader(int row, java.lang.Object rowHeader)
          Updates a row header associated with the table.
 void setRowHeaders(java.lang.Object[] rowHeaders)
          Defines the row headers associated with the table.
 
Methods inherited from interface com.rational.test.ft.vp.ITestData
getData, getDataType, getDescription, getName, getProperty, getPropertyKeys, getType, setData, setDataType, setDescription, setName, setProperty, setType
 

Method Detail

getColumnCount

int getColumnCount()
Returns the number of columns in the table.

Since:
RFT1.0

getRowCount

int getRowCount()
Returns the number of rows in the table.

Since:
RFT1.0

hasColumnHeaders

boolean hasColumnHeaders()
Returns true if the corresponding table has column headers.

Since:
RFT1.0

getColumnHeader

java.lang.Object getColumnHeader(int column)
Returns the table-column header corresponding to the specified column index. The column index is a zero-based value. An appropriate exception is thrown if the index is out of range or if the table does not have column headers.

Since:
RFT1.0

setColumnHeader

void setColumnHeader(int column,                      java.lang.Object columnHeader)
Updates a column header associated with the table.

Parameters:
column - the column in which to use this header
columnHeader - the column header to associate with the specified column
Since:
RFT1.0

setColumnHeaders

void setColumnHeaders(java.lang.Object[] columnHeaders)
Defines the column headers associated with the table.

Since:
RFT1.0

hasRowHeaders

boolean hasRowHeaders()
Returns true if the corresponding table has row headers.

Since:
RFT1.0

getRowHeader

java.lang.Object getRowHeader(int row)
Returns the table row header corresponding to the specified row index. The row index is a zero-based value. An appropriate exception is thrown if the index is out of range or if the table does not have row headers.

Since:
RFT1.0

setRowHeader

void setRowHeader(int row,                   java.lang.Object rowHeader)
Updates a row header associated with the table.

Parameters:
row - the row in which to use this header
rowHeader - the row header to associate with the specified column
Since:
RFT1.0

setRowHeaders

void setRowHeaders(java.lang.Object[] rowHeaders)
Defines the row headers associated with the table.

Since:
RFT1.0

getCell

java.lang.Object getCell(int row,                          int column)
Returns the contents of the cell at the specified column and row index. The column and row index values are zero based. An appropriate exception is thrown if the index is out of range.

Parameters:
row - the index for the desired row
column - the index for the desired column
Returns:
The contents of the cell at the specified column and row
Since:
RFT1.0

setCell

void setCell(int row,              int column,              java.lang.Object value)
Updates the contents of the cell at the specified column and row index. The column and row index values are zero based. An appropriate exception is thrown if the index is out of range.

Parameters:
row - the index for the desired row
column - the index for the desired column
value - the new value to be associated with the cell
Since:
RFT1.0

hasKeyColumns

boolean hasKeyColumns()
Returns true if the table has columns that contain key data fields.

Since:
RFT1.0

getKeyColumns

int[] getKeyColumns()
Returns the indices of the columns that contain key fields. This method is only interesting if hasKeyColumns returns true.

Since:
RFT1.0

setKeyColumns

void setKeyColumns(int[] keyColumns)
Specifies the indices of the columns that contain key fields. If set, hasKeyColumns returns true.

Parameters:
keyColumns - the zero-based column indices of the key columns
Since:
RFT1.0

isCompareColumnHeaders

boolean isCompareColumnHeaders()
Returns true if the column headers should be compared.

Since:
RFT1.0

setCompareColumnHeaders

void setCompareColumnHeaders(boolean compareColumnHeaders)
Specifies whether the column headers should be compared.

Parameters:
compareColumnHeaders - true if the column headers should be compared.
Since:
RFT1.0

hasKeyRows

boolean hasKeyRows()
Returns true if the table has rows that contain key data fields.

Since:
RFT1.0

getKeyRows

int[] getKeyRows()
Returns the indices of the rows that contain key fields. This method is only interesting if hasKeyRows returns true.

Since:
RFT1.0

setKeyRows

void setKeyRows(int[] keyRows)
Specifies the indices of the rows that are used for key row specifications. If set, hasKeyRows returns true.

Since:
RFT1.0

isCompareRowHeaders

boolean isCompareRowHeaders()
Returns true if the row headers should be compared.

Since:
RFT1.0

setCompareRowHeaders

void setCompareRowHeaders(boolean compareRowHeaders)
Specifies if the row headers should be compared.

Parameters:
compareRowHeaders - true if the row headers should be compared.
Since:
RFT1.0

getColumnIndex

int getColumnIndex(Column column)
Converts a column specification to a zero-based column index. -1 is returned if the column specification cannot be converted into an index for this table.

Parameters:
column - a column specification for this table
Since:
RFT1.0

getRowIndex

int getRowIndex(Row row)
Converts a row specification to a zero-based row index. -1 is returned if the row specification cannot be converted into an index for this table.

Parameters:
row - a row specification for this table
Since:
RFT1.0

isCompareBothByLeftRegions

boolean isCompareBothByLeftRegions()
Specifies whether the comparison should be performed by using the comparison regions of both left and right values or just the left. If comparing using both left and right comparison regions, any change in structure of the comparison region results in a compare failure. If using just the left comparison region, the left region is applied to the both right and left data to get the data to compare.

Returns:
true if data specific comparison regions should be used.
Since:
RFT1.0
See Also:
setCompareBothByLeftRegions(boolean)

setCompareBothByLeftRegions

void setCompareBothByLeftRegions(boolean compareBothByLeftRegions)
Specifies whether the comparison should be performed by using the comparison regions of both left and right values or just the left. If comparing using both left and right comparison regions, any change in structure of the comparison region results in a compare failure. If using just the left comparison region, the left region is applied to the both right and left data to get the data to compare.

Since:
RFT1.0
See Also:
isCompareBothByLeftRegions()

getComparisonRegions

ITestDataTableRegion[] getComparisonRegions()
Returns the set of comparison regions to be used in a comparison of table data. Multiple ranges can be chosen, and the resulting array reflects all those ranges. If there are no selected regions in the corresponding table, null can be returned.

Typically all cells are compared when the table contents are requested from a TestObject getTestData method call. Only when the selected data is requested will the regions default to something other then all cells.

Returns:
The comparison regions used when comparing two table data objects.
Since:
RFT1.0

setComparisonRegions

void setComparisonRegions(ITestDataTableRegion[] comparisonRegions)
Replaces the existing selected regions with the supplied comparison regions. Passing in a null value results in no selected regions being associated with the table.

Parameters:
comparisonRegions - the new set of comparison regions to use with this table.
Since:
RFT1.0

addComparisonRegion

void addComparisonRegion(ITestDataTableRegion comparisonRegion)
Adds the supplied comparison region to the set. This region is used when comparing this table data object to another table data object.

Parameters:
comparisonRegion - a new region to associate with the table
Since:
RFT1.0

removeComparisonRegion

void removeComparisonRegion(ITestDataTableRegion comparisonRegion)
Removes the supplied comparison region from the region set associated with this table data object. If the region does not exist in the current set, no action is performed.

Parameters:
comparisonRegion - the region to remove from the comparison region set
Since:
RFT1.0