Added cache manager for classes found in entity type

Complement for [ 1784588 ] Use ModelPackage of EntityType to Find Model Class
This commit is contained in:
Carlos Ruiz 2007-11-15 08:09:24 +00:00
parent d53e92512e
commit 8e05d48347
1 changed files with 6 additions and 2 deletions

View File

@ -223,11 +223,15 @@ public class MTable extends X_AD_Table
if (modelpackage != null)
{
Class clazz = getPOclass(entityTypes[i].getModelPackage() + ".M" + Util.replace(tableName, "_", ""));
if (clazz != null)
if (clazz != null) {
s_classCache.put(tableName, clazz);
return clazz;
}
clazz = getPOclass(entityTypes[i].getModelPackage() + ".X_" + tableName);
if (clazz != null)
if (clazz != null) {
s_classCache.put(tableName, clazz);
return clazz;
}
s_log.warning("No class for table with it entity: " + tableName);
}
}