public DataTypeDefinition getType() {
if (type == null) {
Database db = container.getDatabase();
// [#677] Forced types for matching regular expressions
ForcedType forcedType = db.getConfiguredForcedType(this);
if (forcedType != null) {
log.debug("Forcing type", this + " into " + forcedType.getName());
DataType<?> forcedDataType = null;
String t = definedType.getType();
int l = definedType.getLength();
int p = definedType.getPrecision();
int s = definedType.getScale();
try {
forcedDataType = getDialectDataType(db.getDialect(), forcedType.getName(), p, s);
} catch (SQLDialectNotSupportedException ignore) {}
// [#677] SQLDataType matches are actual type-rewrites
if (forcedDataType != null) {
type = new DefaultDataTypeDefinition(db, getSchema(), forcedType.getName(), l, p, s);
}
// Other forced types are UDT's, enums, etc.
else {
type = new DefaultDataTypeDefinition(db, getSchema(), t, l, p, s, forcedType.getName());
}
}
// [#976] Mapping DATE as TIMESTAMP
if (db.dateAsTimestamp()) {