Class PrimaryKeyFilteredTableWrapper

java.lang.Object
org.dbunit.database.PrimaryKeyFilteredTableWrapper
All Implemented Interfaces:
ITable

public class PrimaryKeyFilteredTableWrapper extends Object implements ITable
This class is a wrapper for another table with the condition that only a subset of the original table will be available - the subset is defined by the set of primary keys that are allowed in the new table.
Since:
Sep 9, 2005
Version:
$Revision$
Author:
Felipe Leme (dbunit@felipeal.net)
  • Field Details

    • logger

      protected final org.slf4j.Logger logger
      logger
  • Constructor Details

    • PrimaryKeyFilteredTableWrapper

      public PrimaryKeyFilteredTableWrapper(ITable table, Set allowedPKs) throws DataSetException
      Creates a PKFilteredTable given an original table and the allowed primary keys for that table.
      Parameters:
      table - original table
      allowedPKs - primary keys allowed on the new table
      Throws:
      DataSetException - if something happened while getting the information
  • Method Details

    • getTableMetaData

      public ITableMetaData getTableMetaData()
      Description copied from interface: ITable
      Returns this table metadata.
      Specified by:
      getTableMetaData in interface ITable
    • getRowCount

      public int getRowCount()
      Description copied from interface: ITable
      Returns this table row count.
      Specified by:
      getRowCount in interface ITable
    • getValue

      public Object getValue(int row, String column) throws DataSetException
      Description copied from interface: ITable
      Returns this table value for the specified row and column.
      Specified by:
      getValue in interface ITable
      Parameters:
      row - The row index, starting with 0
      column - The name of the column
      Returns:
      The value
      Throws:
      DataSetException