org.unitils.dbunit.dataset
Class Table

java.lang.Object
  extended by org.unitils.dbunit.dataset.Table

public class Table
extends Object

A data set table

Author:
Tim Ducheyne, Filip Neven

Constructor Summary
Table(String name)
          Creates a data set table.
 
Method Summary
 void addRow(Row row)
          Adds a data set row
 TableDifference compare(Table actualTable)
          Compares the table with the given actual table.
protected  void compareRows(List<Row> rows, Table actualTable, TableDifference result)
          Compares the given rows with the columns of the actual table.
 String getName()
           
 List<Row> getRows()
           
 boolean isEmpty()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Table

public Table(String name)
Creates a data set table.

Parameters:
name - The name of the table, not null
Method Detail

getName

public String getName()
Returns:
The name of the table, not null

getRows

public List<Row> getRows()
Returns:
The data set rows, not null

isEmpty

public boolean isEmpty()
Returns:
True if the table does not contain any rows

addRow

public void addRow(Row row)
Adds a data set row

Parameters:
row - The row to add, not null

compare

public TableDifference compare(Table actualTable)
Compares the table with the given actual table.

Parameters:
actualTable - The table to compare with, not null
Returns:
The difference, null if none found

compareRows

protected void compareRows(List<Row> rows,
                           Table actualTable,
                           TableDifference result)
Compares the given rows with the columns of the actual table.

Parameters:
rows - The rows to compare, not null
actualTable - The rows to compare with, not null
result - The result to add the differences to, not null


Copyright © 2011. All Rights Reserved.