Class TableColumnValueComparerMapBuilder
java.lang.Object
org.dbunit.assertion.comparer.value.builder.TableColumnValueComparerMapBuilder
Convenience methods to help build the map of table name -> map of column name
->
ValueComparer.- Since:
- 2.6.0
- Author:
- Jeff Jensen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(String tableName, String columnName, ValueComparer valueComparer) Add a table to column toValueComparermapping.add(String tableName, Map<String, ValueComparer> columnValueComparers) Add all mappings from the specified column map to a column map for the specified table in this builder.add(String tableName, ColumnValueComparerMapBuilder columnValueComparerMapBuilder) Add all mappings from the specifiedColumnValueComparerMapBuilderbuilder to a column map for the specified table in this builder.Add all mappings from the specified table map to this builder.add(TableColumnValueComparerMapBuilder tableColumnValueComparerMapBuilder) Add all mappings from the specifiedTableColumnValueComparerMapBuilderbuilder to this builder.build()Assembles and returns the built map.protected Map<String, ValueComparer> findOrMakeColumnMap(String tableName) Returns the column map for the given table, creating and registering one if absent.protected Map<String, ValueComparer> Creates a new, empty column-to-ValueComparermap.
-
Constructor Details
-
TableColumnValueComparerMapBuilder
public TableColumnValueComparerMapBuilder()
-
-
Method Details
-
add
public TableColumnValueComparerMapBuilder add(Map<String, Map<String, ValueComparer>> tableColumnValueComparers) Add all mappings from the specified table map to this builder.- Parameters:
tableColumnValueComparers- the table map to add.- Returns:
- this for fluent syntax.
-
add
public TableColumnValueComparerMapBuilder add(TableColumnValueComparerMapBuilder tableColumnValueComparerMapBuilder) Add all mappings from the specifiedTableColumnValueComparerMapBuilderbuilder to this builder.- Parameters:
tableColumnValueComparerMapBuilder- the builder whose mappings to add.- Returns:
- this for fluent syntax.
-
add
public TableColumnValueComparerMapBuilder add(String tableName, Map<String, ValueComparer> columnValueComparers) Add all mappings from the specified column map to a column map for the specified table in this builder.- Parameters:
tableName- the table to add the column map for.columnValueComparers- the column map to add.- Returns:
- this for fluent syntax.
-
add
public TableColumnValueComparerMapBuilder add(String tableName, ColumnValueComparerMapBuilder columnValueComparerMapBuilder) Add all mappings from the specifiedColumnValueComparerMapBuilderbuilder to a column map for the specified table in this builder.- Parameters:
tableName- the table to add the column map for.columnValueComparerMapBuilder- the builder whose column mappings to add.- Returns:
- this for fluent syntax.
-
add
public TableColumnValueComparerMapBuilder add(String tableName, String columnName, ValueComparer valueComparer) Add a table to column toValueComparermapping.- Parameters:
tableName- the table the mapping applies to.columnName- the column the mapping applies to.valueComparer- the value comparer to map to the given table and column.- Returns:
- this for fluent syntax.
-
build
Assembles and returns the built map.- Returns:
- The unmodifiable assembled map.
-
findOrMakeColumnMap
Returns the column map for the given table, creating and registering one if absent.- Parameters:
tableName- the table to find or create the column map for.- Returns:
- the column map for the given table.
-
makeColumnToValueComparerMap
Creates a new, empty column-to-ValueComparermap.- Returns:
- a new, empty column-to-
ValueComparermap.
-