Package org.dbunit.dataset
Class DefaultTableMetaData
java.lang.Object
org.dbunit.dataset.AbstractTableMetaData
org.dbunit.dataset.DefaultTableMetaData
- All Implemented Interfaces:
ITableMetaData
Straightforward
ITableMetaData implementation holding an explicit table
name, column list, and primary keys.- Since:
- Feb 17, 2002
- Version:
- $Revision$
- Author:
- Manuel Laflamme
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultTableMetaData(String tableName, Column[] columns) Creates metadata for a table with no primary keys.DefaultTableMetaData(String tableName, Column[] columns, String[] primaryKeys) Creates metadata for a table with the given primary key column names.DefaultTableMetaData(String tableName, Column[] columns, Column[] primaryKeys) Creates metadata for a table with the given primary key columns. -
Method Summary
Methods inherited from class org.dbunit.dataset.AbstractTableMetaData
getColumnIndex, getDataTypeFactory, getPrimaryKeys, getPrimaryKeys
-
Constructor Details
-
DefaultTableMetaData
Creates metadata for a table with no primary keys.- Parameters:
tableName- the table name.columns- the table columns.
-
DefaultTableMetaData
Creates metadata for a table with the given primary key column names.- Parameters:
tableName- the table name.columns- the table columns.primaryKeys- the names of the primary key columns.
-
DefaultTableMetaData
Creates metadata for a table with the given primary key columns.- Parameters:
tableName- the table name.columns- the table columns.primaryKeys- the primary key columns.
-
-
Method Details
-
toString
-
getTableName
Description copied from interface:ITableMetaDataReturns this table name.- Returns:
- this table name
-
getColumns
Description copied from interface:ITableMetaDataReturns 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
-
getPrimaryKeys
Description copied from interface:ITableMetaDataReturns this table primary key columns.- Returns:
- this table primary key columns.
-