Package org.dbunit.dataset
Class AbstractTable
java.lang.Object
org.dbunit.dataset.AbstractTable
- All Implemented Interfaces:
ITable
- Direct Known Subclasses:
AbstractResultSetTable,CompositeTable,DefaultTable,SortedTable
Abstract base implementation of
ITable, providing common column-lookup
and value-formatting behavior for concrete table implementations.- Since:
- Feb 17, 2002
- Version:
- $Revision$
- Author:
- Manuel Laflamme
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidassertValidColumn(String columnName) Validates that the given column name exists in this table.protected voidassertValidRowIndex(int row) Validates that the given row index is within the bounds of this table.protected voidassertValidRowIndex(int row, int rowCount) Validates that the given row index is within the given row count.protected intgetColumnIndex(String columnName) Returns the index of the column with the given name.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.dbunit.dataset.ITable
getRowCount, getTableMetaData, getValue
-
Constructor Details
-
AbstractTable
public AbstractTable()
-
-
Method Details
-
assertValidRowIndex
Validates that the given row index is within the bounds of this table.- Parameters:
row- the row index to validate.- Throws:
DataSetException- if the row index is out of bounds.
-
assertValidRowIndex
Validates that the given row index is within the given row count.- Parameters:
row- the row index to validate.rowCount- the number of rows to validate against.- Throws:
DataSetException- if the row index is out of bounds.
-
assertValidColumn
Validates that the given column name exists in this table.- Parameters:
columnName- the column name to validate.- Throws:
DataSetException- if no column with the given name exists in this table.
-
getColumnIndex
Returns the index of the column with the given name.- Parameters:
columnName- the column name to look up.- Returns:
- the index of the column with the given name.
- Throws:
DataSetException- if no column with the given name exists in this table.
-