org.unitils.dbunit.dataset
Class Table

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

public class Table
extends java.lang.Object

A data set table

Author:
Tim Ducheyne, Filip Neven

Constructor Summary
Table(java.lang.String name)
          Creates a data set table.
 
Method Summary
 void addColumn(org.dbunit.dataset.Column column)
           
 void addColumns(org.dbunit.dataset.Column[] columns2)
           
 void addRow(Row row)
          Adds a data set row
 TableDifference compare(Table actualTable)
          Compares the table with the given actual table.
protected  void compareRows(java.util.List<Row> rows, Table actualTable, TableDifference result)
          Compares the given rows with the columns of the actual table.
 java.util.List<org.dbunit.dataset.Column> getColumns()
           
 java.lang.String getName()
           
 java.util.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(java.lang.String name)
Creates a data set table.

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

getName

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

getRows

public java.util.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(java.util.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

getColumns

public java.util.List<org.dbunit.dataset.Column> getColumns()
Returns:
the columns

addColumns

public void addColumns(org.dbunit.dataset.Column[] columns2)

addColumn

public void addColumn(org.dbunit.dataset.Column column)


Copyright © 2014. All Rights Reserved.