Interface ITableMetaData

All Known Implementing Classes:
AbstractTableMetaData, DatabaseTableMetaData, DefaultTableMetaData, FilteredTableMetaData, LowerCaseTableMetaData, ResultSetTableMetaData

public interface ITableMetaData
Represents table metadata.
Since:
Feb 17, 2002
Version:
$Revision$
Author:
Manuel Laflamme
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    getColumnIndex(String columnName)
    Returns the column's array index of the column with the given name within this table metadata.
    Returns this table columns as recognized by dbunit.
    Returns this table primary key columns.
    Returns this table name.
  • Method Details

    • getTableName

      String getTableName()
      Returns this table name.
      Returns:
      this table name
    • getColumns

      Column[] getColumns() throws DataSetException
      Returns this table columns as recognized by dbunit. In cases where columns are resolved using database metadata it can happen that an empty array is returned when a table does not have a single column that is recognized by the configured IDataTypeFactory. Note that it is not an exceptional case within dbunit when a ITableMetaData does not have a column.
      Returns:
      The columns for this table
      Throws:
      DataSetException
    • getPrimaryKeys

      Column[] getPrimaryKeys() throws DataSetException
      Returns this table primary key columns.
      Returns:
      this table primary key columns.
      Throws:
      DataSetException
    • getColumnIndex

      int getColumnIndex(String columnName) throws DataSetException
      Returns the column's array index of the column with the given name within this table metadata.
      Parameters:
      columnName - The name of the column that is searched
      Returns:
      The index of the given column within this metadata, starting with 0 for the first column
      Throws:
      NoSuchColumnException - if the given column has not been found
      DataSetException - if something goes wrong when trying to retrieve the columns
      Since:
      2.3.0