public class DefaultDataTypeFactory extends Object implements IDataTypeFactory, IDbProductRelatable
Constructor and Description |
---|
DefaultDataTypeFactory() |
Modifier and Type | Method and Description |
---|---|
void |
addToleratedDelta(ToleratedDeltaMap.ToleratedDelta delta)
Adds a tolerated delta to this data type factory to be used for numeric comparisons
|
DataType |
createDataType(int sqlType,
String sqlTypeName)
Returns the DataType object that corresponds to the specified
Types . |
DataType |
createDataType(int sqlType,
String sqlTypeName,
String tableName,
String columnName)
Returns the DataType object that corresponds to the specified
Types and regards the given tableName and columnName. |
ToleratedDeltaMap |
getToleratedDeltaMap() |
Collection |
getValidDbProducts()
Returns a set of Strings representing database product names that this object relates to.
|
String |
toString()
Returns a string representation of this
DefaultDataTypeFactory instance |
public Collection getValidDbProducts()
IDbProductRelatable
getValidDbProducts
in interface IDbProductRelatable
IDbProductRelatable.getValidDbProducts()
public DataType createDataType(int sqlType, String sqlTypeName) throws DataTypeException
IDataTypeFactory
Types
.createDataType
in interface IDataTypeFactory
sqlType
- SQL type from Types
sqlTypeName
- Data source dependent type nameDataTypeException
IDataTypeFactory.createDataType(int, java.lang.String)
public DataType createDataType(int sqlType, String sqlTypeName, String tableName, String columnName) throws DataTypeException
IDataTypeFactory
Types
and regards the given tableName and columnName.
When a ToleratedDeltaMap.ToleratedDelta
has been set
for a tableName.columnName set then this method automatically creates the correct
datatype that honours the tolerance value in the assertion.createDataType
in interface IDataTypeFactory
sqlType
- SQL type from Types
sqlTypeName
- Data source dependent type nametableName
- The database table for which the type is createdcolumnName
- The database column in the given table for which the type is createdDataTypeException
IDataTypeFactory.createDataType(int, java.lang.String, java.lang.String, java.lang.String)
public ToleratedDeltaMap getToleratedDeltaMap()
public void addToleratedDelta(ToleratedDeltaMap.ToleratedDelta delta)
delta
- The new tolerated delta objectpublic String toString()
DefaultDataTypeFactory
instanceCopyright © 2002–2017. All rights reserved.