Class AbstractTable

java.lang.Object
org.dbunit.dataset.AbstractTable
All Implemented Interfaces:
ITable
Direct Known Subclasses:
AbstractResultSetTable, CompositeTable, DefaultTable, SortedTable

public abstract class AbstractTable extends Object implements ITable
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
  • Constructor Details

    • AbstractTable

      public AbstractTable()
  • Method Details

    • assertValidRowIndex

      protected void assertValidRowIndex(int row) throws DataSetException
      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

      protected void assertValidRowIndex(int row, int rowCount) throws DataSetException
      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

      protected void assertValidColumn(String columnName) throws DataSetException
      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

      protected int getColumnIndex(String columnName) throws DataSetException
      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.