View Javadoc
1   package org.dbunit.assertion;
2   
3   import java.util.Arrays;
4   import java.util.Map;
5   
6   import org.dbunit.DatabaseUnitException;
7   import org.dbunit.assertion.DbUnitAssert.ComparisonColumn;
8   import org.dbunit.assertion.comparer.value.DefaultValueComparerDefaults;
9   import org.dbunit.assertion.comparer.value.ValueComparer;
10  import org.dbunit.assertion.comparer.value.ValueComparerDefaults;
11  import org.dbunit.dataset.Column;
12  import org.dbunit.dataset.Columns;
13  import org.dbunit.dataset.DataSetException;
14  import org.dbunit.dataset.IDataSet;
15  import org.dbunit.dataset.ITable;
16  import org.dbunit.dataset.ITableMetaData;
17  import org.dbunit.dataset.datatype.DataType;
18  import org.slf4j.Logger;
19  import org.slf4j.LoggerFactory;
20  
21  /**
22   * Base class for DbUnit assert classes containing common methods.
23   *
24   * @author Jeff Jensen
25   * @since 2.6.0
26   */
27  public class DbUnitAssertBase
28  {
29      private final Logger log = LoggerFactory.getLogger(DbUnitAssertBase.class);
30  
31      private FailureFactory junitFailureFactory = getJUnitFailureFactory();
32  
33      protected ValueComparerDefaults valueComparerDefaults =
34              new DefaultValueComparerDefaults();
35  
36      /**
37       * @return The default failure handler
38       * @since 2.4
39       */
40      protected FailureHandler getDefaultFailureHandler()
41      {
42          return getDefaultFailureHandler(null);
43      }
44  
45      /**
46       * @return The default failure handler
47       * @since 2.4
48       */
49      protected FailureHandler getDefaultFailureHandler(
50              final Column[] additionalColumnInfo)
51      {
52          final DefaultFailureHandler failureHandler =
53                  new DefaultFailureHandler(additionalColumnInfo);
54          if (junitFailureFactory != null)
55          {
56              failureHandler.setFailureFactory(junitFailureFactory);
57          }
58          return failureHandler;
59      }
60  
61      /**
62       * @return the JUnitFailureFactory if JUnit is on the classpath or
63       *         <code>null</code> if JUnit is not on the classpath.
64       */
65      private FailureFactory getJUnitFailureFactory()
66      {
67          try
68          {
69              Class.forName("junit.framework.Assert");
70              // JUnit available
71              return new JUnitFailureFactory();
72          } catch (final ClassNotFoundException e)
73          {
74              // JUnit not available on the classpath return null
75              log.debug("JUnit does not seem to be on the classpath. " + e);
76          }
77          return null;
78      }
79  
80      /**
81       * @param expectedTableName
82       * @param expectedColumns
83       * @param actualColumns
84       * @param failureHandler
85       *            The {@link FailureHandler} to be used when no datatype can be
86       *            determined
87       * @return The columns to be used for the assertion, including the correct
88       *         datatype
89       * @since 2.4
90       */
91      protected ComparisonColumn[] getComparisonColumns(
92              final String expectedTableName, final Column[] expectedColumns,
93              final Column[] actualColumns, final FailureHandler failureHandler)
94      {
95          final ComparisonColumn[] result =
96                  new ComparisonColumn[expectedColumns.length];
97  
98          for (int j = 0; j < expectedColumns.length; j++)
99          {
100             final Column expectedColumn = expectedColumns[j];
101             final Column actualColumn = actualColumns[j];
102             result[j] = new ComparisonColumn(expectedTableName, expectedColumn,
103                     actualColumn, failureHandler);
104         }
105         return result;
106     }
107 
108     /**
109      * Method to last-minute intercept the comparison of a single expected and
110      * actual value. Designed to be overridden in order to skip cell comparison
111      * by specific cell values.
112      *
113      * @param columnName
114      *            The column being compared
115      * @param expectedValue
116      *            The expected value to be compared
117      * @param actualValue
118      *            The actual value to be compared
119      * @return <code>false</code> always so that the comparison is never skipped
120      * @since 2.4
121      */
122     protected boolean skipCompare(final String columnName,
123             final Object expectedValue, final Object actualValue)
124     {
125         return false;
126     }
127 
128     protected FailureHandler determineFailureHandler(
129             final FailureHandler failureHandler)
130     {
131         final FailureHandler validFailureHandler;
132 
133         if (failureHandler == null)
134         {
135             log.debug("FailureHandler is null. Using default implementation");
136             validFailureHandler = getDefaultFailureHandler();
137         } else
138         {
139             validFailureHandler = failureHandler;
140         }
141 
142         return validFailureHandler;
143     }
144 
145     protected boolean compareRowCounts(final ITable expectedTable,
146             final ITable actualTable, final FailureHandler failureHandler,
147             final String expectedTableName) throws Error
148     {
149         boolean isTablesEmpty;
150 
151         final int expectedRowsCount = expectedTable.getRowCount();
152         int actualRowsCount = 0;
153         boolean skipRowComparison = false;
154         try
155         {
156             actualRowsCount = actualTable.getRowCount();
157         } catch (final UnsupportedOperationException exception)
158         {
159             skipRowComparison = true;
160         }
161 
162         if (skipRowComparison)
163         {
164             isTablesEmpty = false;
165         } else
166         {
167             if (expectedRowsCount != actualRowsCount)
168             {
169                 final String msg =
170                         "row count (table=" + expectedTableName + ")";
171                 final Error error = failureHandler.createFailure(msg,
172                         String.valueOf(expectedRowsCount),
173                         String.valueOf(actualRowsCount));
174                 log.error(error.toString());
175                 throw error;
176             }
177 
178             // if both tables are empty, it is not necessary to compare columns,
179             // as such comparison can fail if column metadata is different
180             // (which could occurs when comparing empty tables)
181             if (expectedRowsCount == 0 && actualRowsCount == 0)
182             {
183                 log.debug("Tables are empty, hence equals.");
184                 isTablesEmpty = true;
185             } else
186             {
187                 isTablesEmpty = false;
188             }
189         }
190 
191         return isTablesEmpty;
192     }
193 
194     protected void compareColumns(final Column[] expectedColumns,
195             final Column[] actualColumns, final ITableMetaData expectedMetaData,
196             final ITableMetaData actualMetaData,
197             final FailureHandler failureHandler) throws DataSetException, Error
198     {
199         final Columns.ColumnDiff columnDiff =
200                 Columns.getColumnDiff(expectedMetaData, actualMetaData);
201         if (columnDiff.hasDifference())
202         {
203             final String message = columnDiff.getMessage();
204             final Error error = failureHandler.createFailure(message,
205                     Columns.getColumnNamesAsString(expectedColumns),
206                     Columns.getColumnNamesAsString(actualColumns));
207             log.error(error.toString());
208             throw error;
209         }
210     }
211 
212     protected void compareTableCounts(final String[] expectedNames,
213             final String[] actualNames, final FailureHandler failureHandler)
214             throws Error
215     {
216         if (expectedNames.length != actualNames.length)
217         {
218             throw failureHandler.createFailure("table count",
219                     String.valueOf(expectedNames.length),
220                     String.valueOf(actualNames.length));
221         }
222     }
223 
224     protected void compareTableNames(final String[] expectedNames,
225             final String[] actualNames, final FailureHandler failureHandler)
226             throws Error
227     {
228         for (int i = 0; i < expectedNames.length; i++)
229         {
230             if (!actualNames[i].equals(expectedNames[i]))
231             {
232                 throw failureHandler.createFailure("tables",
233                         Arrays.asList(expectedNames).toString(),
234                         Arrays.asList(actualNames).toString());
235             }
236         }
237     }
238 
239     protected String[] getSortedTableNames(final IDataSet dataSet)
240             throws DataSetException
241     {
242         log.debug("getSortedTableNames(dataSet={}) - start", dataSet);
243 
244         final String[] names = dataSet.getTableNames();
245         if (!dataSet.isCaseSensitiveTableNames())
246         {
247             for (int i = 0; i < names.length; i++)
248             {
249                 names[i] = names[i].toUpperCase();
250             }
251         }
252         Arrays.sort(names);
253         return names;
254     }
255 
256     /**
257      * Asserts the two specified {@link IDataSet}s comparing their columns using
258      * the specified columnValueComparers or defaultValueComparer and handles
259      * failures using the specified failureHandler. This method ignores the
260      * table names, the columns order, the columns data type, and which columns
261      * are composing the primary keys.
262      *
263      * @param expectedDataSet
264      *            {@link IDataSet} containing all expected results.
265      * @param actualDataSet
266      *            {@link IDataSet} containing all actual results.
267      * @param failureHandler
268      *            The failure handler used if the assert fails because of a data
269      *            mismatch. Provides some additional information that may be
270      *            useful to quickly identify the rows for which the mismatch
271      *            occurred (for example by printing an additional primary key
272      *            column). Can be <code>null</code>.
273      * @param defaultValueComparer
274      *            {@link ValueComparer} to use with column value comparisons
275      *            when the column name for the table is not in the
276      *            tableColumnValueComparers {@link Map}. Can be
277      *            <code>null</code> and will default to
278      *            {@link #getDefaultValueComparer()}.
279      * @param tableColumnValueComparers
280      *            {@link Map} of {@link ValueComparer}s to use for specific
281      *            tables and columns. Key is table name, value is {@link Map} of
282      *            column name in the table to {@link ValueComparer}s. Can be
283      *            <code>null</code> and will default to using
284      *            {@link #getDefaultColumnValueComparerMapForTable(String)} or,
285      *            if that is empty, defaultValueComparer for all columns in all
286      *            tables.
287      * @throws DatabaseUnitException
288      */
289     public void assertWithValueComparer(final IDataSet expectedDataSet,
290             final IDataSet actualDataSet, final FailureHandler failureHandler,
291             final ValueComparer defaultValueComparer,
292             final Map<String, Map<String, ValueComparer>> tableColumnValueComparers)
293             throws DatabaseUnitException
294     {
295         log.debug(
296                 "assertWithValueComparer(expectedDataSet={}, actualDataSet={},"
297                         + " failureHandler={}, defaultValueComparer={},"
298                         + " tableColumnValueComparers={}) - start",
299                 expectedDataSet, actualDataSet, failureHandler,
300                 defaultValueComparer, tableColumnValueComparers);
301 
302         // do not continue if same instance
303         if (expectedDataSet == actualDataSet)
304         {
305             log.debug("The given datasets reference the same object."
306                     + " Skipping comparisons.");
307             return;
308         }
309 
310         final FailureHandler validFailureHandler =
311                 determineFailureHandler(failureHandler);
312 
313         final String[] expectedNames = getSortedTableNames(expectedDataSet);
314         final String[] actualNames = getSortedTableNames(actualDataSet);
315 
316         compareTableCounts(expectedNames, actualNames, validFailureHandler);
317 
318         // table names in no specific order
319         compareTableNames(expectedNames, actualNames, validFailureHandler);
320 
321         compareTables(expectedDataSet, actualDataSet, expectedNames,
322                 validFailureHandler, defaultValueComparer,
323                 tableColumnValueComparers);
324     }
325 
326     protected void compareTables(final IDataSet expectedDataSet,
327             final IDataSet actualDataSet, final String[] expectedNames,
328             final FailureHandler failureHandler,
329             final ValueComparer defaultValueComparer,
330             final Map<String, Map<String, ValueComparer>> tableColumnValueComparers)
331             throws DatabaseUnitException
332     {
333         final Map<String, Map<String, ValueComparer>> validTableColumnValueComparers =
334                 determineValidTableColumnValueComparers(
335                         tableColumnValueComparers);
336 
337         for (int i = 0; i < expectedNames.length; i++)
338         {
339             final String tableName = expectedNames[i];
340 
341             final ITable expectedTable = expectedDataSet.getTable(tableName);
342             final ITable actualTable = actualDataSet.getTable(tableName);
343             final Map<String, ValueComparer> columnValueComparers =
344                     validTableColumnValueComparers.get(tableName);
345 
346             assertWithValueComparer(expectedTable, actualTable, failureHandler,
347                     defaultValueComparer, columnValueComparers);
348         }
349     }
350 
351     /**
352      * Asserts the two specified {@link ITable}s comparing their columns using
353      * the specified columnValueComparers or defaultValueComparer and handles
354      * failures using the specified failureHandler. This method ignores the
355      * table names, the columns order, the columns data type, and which columns
356      * are composing the primary keys.
357      *
358      * @param expectedTable
359      *            {@link ITable} containing all expected results.
360      * @param actualTable
361      *            {@link ITable} containing all actual results.
362      * @param failureHandler
363      *            The failure handler used if the assert fails because of a data
364      *            mismatch. Provides some additional information that may be
365      *            useful to quickly identify the rows for which the mismatch
366      *            occurred (for example by printing an additional primary key
367      *            column). Can be <code>null</code>.
368      * @param defaultValueComparer
369      *            {@link ValueComparer} to use with column value comparisons
370      *            when the column name for the table is not in the
371      *            columnValueComparers {@link Map}. Can be <code>null</code> and
372      *            will default to {@link #getDefaultValueComparer()}.
373      * @param columnValueComparers
374      *            {@link Map} of {@link ValueComparer}s to use for specific
375      *            columns. Key is column name in the table, value is
376      *            {@link ValueComparer} to use in comparing expected to actual
377      *            column values. Can be <code>null</code> and will default to
378      *            using
379      *            {@link #getDefaultColumnValueComparerMapForTable(String)} or,
380      *            if that is empty, defaultValueComparer for all columns in the
381      *            table.
382      * @throws DatabaseUnitException
383      */
384     public void assertWithValueComparer(final ITable expectedTable,
385             final ITable actualTable, final FailureHandler failureHandler,
386             final ValueComparer defaultValueComparer,
387             final Map<String, ValueComparer> columnValueComparers)
388             throws DatabaseUnitException
389     {
390         log.trace("assertWithValueComparer(expectedTable, actualTable,"
391                 + " failureHandler, defaultValueComparer,"
392                 + " columnValueComparers) - start");
393         log.debug("assertWithValueComparer: expectedTable={}", expectedTable);
394         log.debug("assertWithValueComparer: actualTable={}", actualTable);
395         log.debug("assertWithValueComparer: failureHandler={}", failureHandler);
396         log.debug("assertWithValueComparer: defaultValueComparer={}",
397                 defaultValueComparer);
398         log.debug("assertWithValueComparer: columnValueComparers={}",
399                 columnValueComparers);
400 
401         // Do not continue if same instance
402         if (expectedTable == actualTable)
403         {
404             log.debug("The given tables reference the same object."
405                     + " Skipping comparisons.");
406             return;
407         }
408 
409         final FailureHandler validFailureHandler =
410                 determineFailureHandler(failureHandler);
411 
412         final ITableMetaData expectedMetaData =
413                 expectedTable.getTableMetaData();
414         final ITableMetaData actualMetaData = actualTable.getTableMetaData();
415         final String expectedTableName = expectedMetaData.getTableName();
416 
417         final boolean isTablesEmpty = compareRowCounts(expectedTable,
418                 actualTable, validFailureHandler, expectedTableName);
419         if (isTablesEmpty)
420         {
421             return;
422         }
423 
424         // Put the columns into the same order
425         final Column[] expectedColumns =
426                 Columns.getSortedColumns(expectedMetaData);
427         final Column[] actualColumns = Columns.getSortedColumns(actualMetaData);
428 
429         // Verify columns
430         compareColumns(expectedColumns, actualColumns, expectedMetaData,
431                 actualMetaData, validFailureHandler);
432 
433         // Get the datatypes to be used for comparing the sorted columns
434         final ComparisonColumn[] comparisonCols =
435                 getComparisonColumns(expectedTableName, expectedColumns,
436                         actualColumns, validFailureHandler);
437 
438         // Finally compare the data
439         compareData(expectedTable, actualTable, comparisonCols,
440                 validFailureHandler, defaultValueComparer,
441                 columnValueComparers);
442     }
443 
444     /**
445      * @param expectedTable
446      *            Table containing all expected results.
447      * @param actualTable
448      *            Table containing all actual results.
449      * @param comparisonCols
450      *            The columns to be compared, also including the correct
451      *            {@link DataType}s for comparison
452      * @param failureHandler
453      *            The failure handler used if the assert fails because of a data
454      *            mismatch. Provides some additional information that may be
455      *            useful to quickly identify the rows for which the mismatch
456      *            occurred (for example by printing an additional primary key
457      *            column). Must not be <code>null</code> at this stage
458      * @throws DataSetException
459      * @since 2.4
460      */
461     protected void compareData(final ITable expectedTable,
462             final ITable actualTable, final ComparisonColumn[] comparisonCols,
463             final FailureHandler failureHandler) throws DataSetException
464     {
465         final ValueComparer defaultValueComparer = null;
466         final Map<String, ValueComparer> columnValueComparers = null;
467         try
468         {
469             compareData(expectedTable, actualTable, comparisonCols,
470                     failureHandler, defaultValueComparer, columnValueComparers);
471         } catch (final DatabaseUnitException e)
472         {
473             // not-private method, signature change breaks compatability
474             throw new DataSetException(e);
475         }
476     }
477 
478     /**
479      * @param expectedTable
480      *            {@link ITable} containing all expected results.
481      * @param actualTable
482      *            {@link ITable} containing all actual results.
483      * @param comparisonCols
484      *            The columns to be compared, also including the correct
485      *            {@link DataType}s for comparison
486      * @param failureHandler
487      *            The failure handler used if the assert fails because of a data
488      *            mismatch. Provides some additional information that may be
489      *            useful to quickly identify the rows for which the mismatch
490      *            occurred (for example by printing an additional primary key
491      *            column). Must not be <code>null</code> at this stage.
492      * @param defaultValueComparer
493      *            {@link ValueComparer} to use with column value comparisons
494      *            when the column name for the table is not in the
495      *            columnValueComparers {@link Map}. Can be <code>null</code> and
496      *            will default to {@link #getDefaultValueComparer()}.
497      * @param columnValueComparers
498      *            {@link Map} of {@link ValueComparer}s to use for specific
499      *            columns. Key is column name in the table, value is
500      *            {@link ValueComparer} to use in comparing expected to actual
501      *            column values. Can be <code>null</code> and will default to
502      *            using
503      *            {@link #getDefaultColumnValueComparerMapForTable(String)} or,
504      *            if that is empty, defaultValueComparer for all columns in the
505      *            table.
506      * @throws DataSetException
507      * @since 2.4
508      * @since 2.6.0
509      */
510     protected void compareData(final ITable expectedTable,
511             final ITable actualTable, final ComparisonColumn[] comparisonCols,
512             final FailureHandler failureHandler,
513             final ValueComparer defaultValueComparer,
514             final Map<String, ValueComparer> columnValueComparers)
515             throws DatabaseUnitException
516     {
517         log.debug(
518                 "compareData(expectedTable={}, actualTable={}, "
519                         + "comparisonCols={}, failureHandler={},"
520                         + " defaultValueComparer={}, columnValueComparers={})"
521                         + " - start",
522                 expectedTable, actualTable, comparisonCols, failureHandler,
523                 defaultValueComparer, columnValueComparers);
524 
525         if (expectedTable == null)
526         {
527             throw new IllegalArgumentException(
528                     "The parameter 'expectedTable' is null");
529         }
530         if (actualTable == null)
531         {
532             throw new IllegalArgumentException(
533                     "The parameter 'actualTable' is null");
534         }
535         if (comparisonCols == null)
536         {
537             throw new IllegalArgumentException(
538                     "The parameter 'comparisonCols' is null");
539         }
540         if (failureHandler == null)
541         {
542             throw new IllegalArgumentException(
543                     "The parameter 'failureHandler' is null");
544         }
545 
546         final ValueComparer validDefaultValueComparer =
547                 determineValidDefaultValueComparer(defaultValueComparer);
548         final String expectedTableName =
549                 expectedTable.getTableMetaData().getTableName();
550         final Map<String, ValueComparer> validColumnValueComparers =
551                 determineValidColumnValueComparers(columnValueComparers,
552                         expectedTableName);
553 
554         // iterate over all rows
555         for (int rowNum = 0; rowNum < expectedTable.getRowCount(); rowNum++)
556         {
557             // iterate over all columns of the current row
558             final int columnCount = comparisonCols.length;
559             for (int columnNum = 0; columnNum < columnCount; columnNum++)
560             {
561                 compareData(expectedTable, actualTable, comparisonCols,
562                         failureHandler, validDefaultValueComparer,
563                         validColumnValueComparers, rowNum, columnNum);
564             }
565         }
566     }
567 
568     protected void compareData(final ITable expectedTable,
569             final ITable actualTable, final ComparisonColumn[] comparisonCols,
570             final FailureHandler failureHandler,
571             final ValueComparer defaultValueComparer,
572             final Map<String, ValueComparer> columnValueComparers,
573             final int rowNum, final int columnNum) throws DatabaseUnitException
574     {
575         final ComparisonColumn compareColumn = comparisonCols[columnNum];
576 
577         final String columnName = compareColumn.getColumnName();
578         final DataType dataType = compareColumn.getDataType();
579 
580         final Object expectedValue = expectedTable.getValue(rowNum, columnName);
581         final Object actualValue = actualTable.getValue(rowNum, columnName);
582 
583         // Compare the values
584         if (skipCompare(columnName, expectedValue, actualValue))
585         {
586             log.trace(
587                     "skipCompare: ignoring comparison" + " {}={} on column={}",
588                     expectedValue, actualValue, columnName);
589         } else
590         {
591             final ValueComparer valueComparer = determineValueComparer(
592                     columnName, defaultValueComparer, columnValueComparers);
593 
594             log.debug(
595                     "compareData: comparing actualValue={}"
596                             + " to expectedValue={} with valueComparer={}",
597                     actualValue, expectedValue, valueComparer);
598             final String failMessage =
599                     valueComparer.compare(expectedTable, actualTable, rowNum,
600                             columnName, dataType, expectedValue, actualValue);
601 
602             failIfNecessary(expectedTable, actualTable, failureHandler, rowNum,
603                     columnName, expectedValue, actualValue, failMessage);
604         }
605     }
606 
607     protected void failIfNecessary(final ITable expectedTable,
608             final ITable actualTable, final FailureHandler failureHandler,
609             final int rowNum, final String columnName,
610             final Object expectedValue, final Object actualValue,
611             final String failMessage)
612     {
613         if (failMessage != null)
614         {
615             final Difference diff = new Difference(expectedTable, actualTable,
616                     rowNum, columnName, expectedValue, actualValue,
617                     failMessage);
618 
619             failureHandler.handle(diff);
620         }
621     }
622 
623     protected ValueComparer determineValueComparer(final String columnName,
624             final ValueComparer defaultValueComparer,
625             final Map<String, ValueComparer> columnValueComparers)
626     {
627         ValueComparer valueComparer = columnValueComparers.get(columnName);
628         if (valueComparer == null)
629         {
630             log.debug(
631                     "determineValueComparer: using defaultValueComparer='{}'"
632                             + " as columnName='{}' not found"
633                             + " in columnValueComparers='{}'",
634                     defaultValueComparer, columnName, columnValueComparers);
635             valueComparer = defaultValueComparer;
636         }
637 
638         return valueComparer;
639     }
640 
641     protected ValueComparer determineValidDefaultValueComparer(
642             final ValueComparer defaultValueComparer)
643     {
644         final ValueComparer validValueComparer;
645 
646         if (defaultValueComparer == null)
647         {
648             validValueComparer =
649                     valueComparerDefaults.getDefaultValueComparer();
650             log.debug(
651                     "determineValidDefaultValueComparer:"
652                             + " using getDefaultValueComparer()={}"
653                             + " as defaultValueComparer={}",
654                     validValueComparer, defaultValueComparer);
655         } else
656         {
657             validValueComparer = defaultValueComparer;
658         }
659 
660         return validValueComparer;
661     }
662 
663     protected Map<String, Map<String, ValueComparer>> determineValidTableColumnValueComparers(
664             final Map<String, Map<String, ValueComparer>> tableColumnValueComparers)
665     {
666         final Map<String, Map<String, ValueComparer>> validMap;
667 
668         if (tableColumnValueComparers == null)
669         {
670             validMap = valueComparerDefaults
671                     .getDefaultTableColumnValueComparerMap();
672             log.debug(
673                     "determineValidTableColumnValueComparers:"
674                             + " using getDefaultTableColumnValueComparerMap()={}"
675                             + " as tableColumnValueComparers={}",
676                     validMap, tableColumnValueComparers);
677         } else
678         {
679             validMap = tableColumnValueComparers;
680         }
681 
682         return validMap;
683     }
684 
685     protected Map<String, ValueComparer> determineValidColumnValueComparers(
686             final Map<String, ValueComparer> columnValueComparers,
687             final String tableName)
688     {
689         final Map<String, ValueComparer> validMap;
690 
691         if (columnValueComparers == null)
692         {
693             validMap = valueComparerDefaults
694                     .getDefaultColumnValueComparerMapForTable(tableName);
695             log.debug(
696                     "determineValidColumnValueComparers:"
697                             + " using getDefaultValueComparerMap()={}"
698                             + " as columnValueComparers={} for tableName={}",
699                     validMap, columnValueComparers, tableName);
700         } else
701         {
702             validMap = columnValueComparers;
703         }
704 
705         return validMap;
706     }
707 
708     public void setValueComparerDefaults(
709             final ValueComparerDefaults valueComparerDefaults)
710     {
711         this.valueComparerDefaults = valueComparerDefaults;
712     }
713 }