org.unitils.dbunit.dataset.comparison
Class SchemaDifference

java.lang.Object
  extended by org.unitils.dbunit.dataset.comparison.SchemaDifference

public class SchemaDifference
extends Object

The differences between 2 data set schemas.

Author:
Tim Ducheyne, Filip Neven

Constructor Summary
SchemaDifference(Schema schema, Schema actualSchema)
          Create a schema difference.
 
Method Summary
 void addMissingTable(Table table)
          Adds a table that was not found in the actual schema
 void addTableDifference(TableDifference tableDifference)
          Adds a result of a table comparison
 Schema getActualSchema()
           
 List<Table> getMissingTables()
           
 Schema getSchema()
           
 List<TableDifference> getTableDifferences()
           
 boolean isMatch()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaDifference

public SchemaDifference(Schema schema,
                        Schema actualSchema)
Create a schema difference.

Parameters:
schema - The expected schema, not null
actualSchema - The actual schema, not null
Method Detail

getSchema

public Schema getSchema()
Returns:
The expected schema, not null

getActualSchema

public Schema getActualSchema()
Returns:
The actual schema, not null

getTableDifferences

public List<TableDifference> getTableDifferences()
Returns:
The differences between the tables of the schema, empty if none found

getMissingTables

public List<Table> getMissingTables()
Returns:
The tables that were not found in the actual schema, empty if none found

addTableDifference

public void addTableDifference(TableDifference tableDifference)
Adds a result of a table comparison

Parameters:
tableDifference - The table comparison, not null

addMissingTable

public void addMissingTable(Table table)
Adds a table that was not found in the actual schema

Parameters:
table - The missing table, not null

isMatch

public boolean isMatch()
Returns:
True if both schemas are a match


Copyright © 2011. All Rights Reserved.