return table;
}
//JIRA-952
public Table addTable(String tableName, String schemaName, String typeName) {
Table table = null;
if(this.config.isDatabaseSchemaNameSupported()){
table = getTable(schemaName+"."+tableName);
}
else{
table = getTable(tableName);
}
if (table != null) {
if(this.config.isDatabaseSchemaNameSupported()){
throw new RuntimeException("Table " + schemaName+"."+tableName + "already exists");
}
else{
throw new RuntimeException("Table " + tableName + "already exists");
}
}
table = ConfigFactory.INSTANCE.createTable();
table.setTableName(tableName);
if(this.config.isDatabaseSchemaNameSupported()){
table.setSchemaName(schemaName);
}
else{
table.setSchemaName("");
}
table.setTypeName(typeName);
config.getTable().add(table);
return table;
}