Package org.dbunit.dataset
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 TypeMethodDescriptionintgetColumnIndex(String columnName) Returns the column's array index of the column with the given name within this table metadata.Column[]Returns this table columns as recognized by dbunit.Column[]Returns this table primary key columns.Returns this table name.
-
Method Details
-
getTableName
String getTableName()Returns this table name.- Returns:
- this table name
-
getColumns
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 configuredIDataTypeFactory. Note that it is not an exceptional case within dbunit when aITableMetaDatadoes not have a column.- Returns:
- The columns for this table
- Throws:
DataSetException
-
getPrimaryKeys
Returns this table primary key columns.- Returns:
- this table primary key columns.
- Throws:
DataSetException
-
getColumnIndex
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 foundDataSetException- if something goes wrong when trying to retrieve the columns- Since:
- 2.3.0
-