* @return the created TableImpl
*/
public TableImpl addTable(AbstractClassMetaData acmd, ForceManagedConnection conn) {
String entityName = PersistenceUtils.getEntityName(acmd).toLowerCase();
try {
TableName tableName = TableName.createTableName(conn.getNamespace(), acmd);
TableImpl tableImpl = tables.get(tableName.getForceApiName().toLowerCase());
if (tableImpl == null) {
tableImpl = new TableImpl(conn.getNamespace(), tableName, sObjectResults.get(tableName.getForceApiName()), conn);
tables.put(tableName.getForceApiName().toLowerCase(), tableImpl);
}
entityTables.put(entityName, tableImpl);
return tableImpl;
} catch (ConnectionException e) {
throw new NucleusException("Could not initialize table: " + entityName, e);