Class LowerCaseTableMetaData

java.lang.Object
org.dbunit.dataset.AbstractTableMetaData
org.dbunit.dataset.LowerCaseTableMetaData
All Implemented Interfaces:
ITableMetaData

public class LowerCaseTableMetaData extends AbstractTableMetaData
Specialized ITableMetaData implementation that convert the table name and column names to lower case. Used in DbUnit own test suite to verify that operations are case insensitive.
Since:
Feb 14, 2003
Version:
$Revision$
Author:
Manuel Laflamme
  • Constructor Details

    • LowerCaseTableMetaData

      public LowerCaseTableMetaData(String tableName, Column[] columns)
      Creates metadata with lower-cased table and column names, and no primary keys.
      Parameters:
      tableName - the table name.
      columns - the table columns.
    • LowerCaseTableMetaData

      public LowerCaseTableMetaData(String tableName, Column[] columns, String[] primaryKeys)
      Creates metadata with lower-cased table and column names, and the given primary key column names.
      Parameters:
      tableName - the table name.
      columns - the table columns.
      primaryKeys - the names of the primary key columns.
    • LowerCaseTableMetaData

      public LowerCaseTableMetaData(ITableMetaData metaData) throws DataSetException
      Creates metadata with the lower-cased table and column names of the given metadata.
      Parameters:
      metaData - the metadata to lower-case.
      Throws:
      DataSetException - if the given metadata's columns cannot be retrieved.
    • LowerCaseTableMetaData

      public LowerCaseTableMetaData(String tableName, Column[] columns, Column[] primaryKeys)
      Creates metadata with lower-cased table and column names, and the given primary key columns.
      Parameters:
      tableName - the table name.
      columns - the table columns.
      primaryKeys - the primary key columns.
  • Method Details

    • getTableName

      public String getTableName()
      Description copied from interface: ITableMetaData
      Returns this table name.
      Returns:
      this table name
    • getColumns

      public Column[] getColumns()
      Description copied from interface: ITableMetaData
      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
    • getPrimaryKeys

      public Column[] getPrimaryKeys()
      Description copied from interface: ITableMetaData
      Returns this table primary key columns.
      Returns:
      this table primary key columns.