public class SchemaFactory extends Object
| Constructor and Description |
|---|
SchemaFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addRows(org.dbunit.dataset.ITable dbUnitTable,
Table table,
List<String> primaryKeyColumnNames)
Adds the rows of the DbUnit table to the given table.
|
protected void |
addTables(org.dbunit.dataset.IDataSet dbUnitDataSet,
Schema schema)
Adds the tables of the DbUnit dataset to the given schema.
|
Schema |
createSchemaForDbUnitDataSet(String schemaName,
org.dbunit.dataset.IDataSet dbUnitDataSet)
Creates a data set schema for the given DbUnit dataset.
|
Schema |
createSchemaForDbUnitDataSet(String schemaName,
org.dbunit.dataset.IDataSet dbUnitDataSet,
List<String> tablesToInclude)
Creates a data set schema for the given DbUnit dataset.
|
protected List<String> |
getPrimaryKeyColumnNames(org.dbunit.dataset.ITable dbUnitTable)
Gets the primary key column names for the given DbUnit table.
|
protected boolean |
shouldIgnoreTable(String tableName,
List<String> tablesToInclude) |
public Schema createSchemaForDbUnitDataSet(String schemaName, org.dbunit.dataset.IDataSet dbUnitDataSet)
schemaName - The schema name that this data set is for, not nulldbUnitDataSet - The DbUnit data set, not nullpublic Schema createSchemaForDbUnitDataSet(String schemaName, org.dbunit.dataset.IDataSet dbUnitDataSet, List<String> tablesToInclude)
schemaName - The schema name that this data set is for, not nulldbUnitDataSet - The DbUnit data set, not nulltablesToInclude - Only tables with these names will be returned the rest will be ignored, null for all tablesprotected void addTables(org.dbunit.dataset.IDataSet dbUnitDataSet,
Schema schema)
throws org.dbunit.dataset.DataSetException
dbUnitDataSet - The DbUnit dataset containing the tables, not nullschema - The schema to add the tables to, not nullorg.dbunit.dataset.DataSetExceptionprotected boolean shouldIgnoreTable(String tableName, List<String> tablesToInclude)
tableName - The table name to check, not nulltablesToInclude - Names of tables to include, null for all tablesprotected void addRows(org.dbunit.dataset.ITable dbUnitTable,
Table table,
List<String> primaryKeyColumnNames)
throws org.dbunit.dataset.DataSetException
dbUnitTable - The DbUnit table containing the rows, not nulltable - The table to add the rows to, not nullprimaryKeyColumnNames - The names of the pk columns, empty if there are noneorg.dbunit.dataset.DataSetExceptionprotected List<String> getPrimaryKeyColumnNames(org.dbunit.dataset.ITable dbUnitTable) throws org.dbunit.dataset.DataSetException
dbUnitTable - The DbUnit table, not nullorg.dbunit.dataset.DataSetExceptionCopyright © 2017. All rights reserved.