本文整理汇总了Java中org.dbunit.dataset.Column.getColumnName方法的典型用法代码示例。如果您正苦于以下问题:Java Column.getColumnName方法的具体用法?Java Column.getColumnName怎么用?Java Column.getColumnName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.dbunit.dataset.Column
的用法示例。
在下文中一共展示了Column.getColumnName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: HackedComparisonColumn
import org.dbunit.dataset.Column; //导入方法依赖的package包/类
public HackedComparisonColumn(String tableName, Column expectedColumn, Column actualColumn, FailureHandler failureHandler) {
// super class is actually useless, all public methods are overridden below
super(tableName, expectedColumn, expectedColumn, failureHandler);
this.columnName = expectedColumn.getColumnName();
this.dataType = getComparisonDataType(tableName, expectedColumn, actualColumn, failureHandler);
}
示例2: getComparisonDataType
import org.dbunit.dataset.Column; //导入方法依赖的package包/类
private DataType getComparisonDataType(String tableName, Column expectedColumn, Column actualColumn, FailureHandler failureHandler) {
if (logger.isDebugEnabled())
logger.debug("getComparisonDataType(tableName={}, expectedColumn={}, actualColumn={}, failureHandler={}) - start", new Object[] { tableName, expectedColumn, actualColumn, failureHandler });
DataType expectedDataType = expectedColumn.getDataType();
DataType actualDataType = actualColumn.getDataType();
// The two columns have different data type
if (!expectedDataType.getClass().isInstance(actualDataType)) {
// Expected column data type is unknown, use actual column data type
if (expectedDataType instanceof UnknownDataType) {
return actualDataType;
}
// Actual column data type is unknown, use expected column data type
if (actualDataType instanceof UnknownDataType) {
return expectedDataType;
}
if (hackIgnoreIntBigIntMismatch) {
if (expectedDataType instanceof IntegerDataType && actualDataType instanceof BigIntegerDataType)
return actualDataType;
}
// Impossible to determine which data type to use
String msg = "Incompatible data types: (table=" + tableName + ", col=" + expectedColumn.getColumnName() + ")";
throw failureHandler.createFailure(msg, String.valueOf(expectedDataType), String.valueOf(actualDataType));
}
// Both columns have same data type, return any one of them
return expectedDataType;
}
示例3: accept
import org.dbunit.dataset.Column; //导入方法依赖的package包/类
@Override
public boolean accept(final String tableName, final Column column) {
// reject column 1
return column.getColumnName() != TABLE_1_COLUMN_1.getColumnName();
}