}
// TODO - AHK - What do we do if there's a table named "Transaction"?
// TODO - AHK - Is it really our job to do any caching at all?
String namespace = fullyQualifiedName.substring(0, lastDot);
String relativeName = fullyQualifiedName.substring(lastDot + 1);
DatabaseImpl databaseImpl = _typeDataByNamespace.get().get(namespace);
if (databaseImpl == null) {
SQLFileInfo data = _sqlFilesByName.get().get(fullyQualifiedName);
if (data != null) {
SQLType sqlType = new SQLType(data, this);
addTypeForFile(data.getSqlFile(), sqlType);
return sqlType.getTypeReference();
} else {
return null;
}
}
IType rVal = null;
if (TransactionType.TYPE_NAME.equals(relativeName)) {
// TODO - AHK - Turn that into a type reference
rVal = new TransactionType(databaseImpl, this).getTypeReference();
} else if (DatabaseAccessType.TYPE_NAME.equals(relativeName)) {
rVal = new DatabaseAccessType(databaseImpl, this).getTypeReference();
} else {
IDBTable dbTable = databaseImpl.getTable(relativeName);
if (dbTable != null) {
rVal = new DBType(this, dbTable).getTypeReference();
}
}
if (rVal != null) {
addTypeForFile(databaseImpl.getDdlFile(), rVal);
}
return rVal;
}