use of org.pentaho.platform.dataaccess.datasource.wizard.service.impl.utils.InlineSqlModelerSource in project data-access by pentaho.
the class ModelerService method generateDomain.
// TODO: remove this method in favor so specific calls
@Deprecated
public Domain generateDomain(String connectionName, String tableName, String dbType, String query, String datasourceName) throws Exception {
initKettle();
try {
DatabaseMeta database = AgileHelper.getDatabaseMeta();
IModelerSource source;
if (tableName != null) {
source = new TableModelerSource(database, tableName, null, datasourceName);
} else {
source = new InlineSqlModelerSource(connectionName, dbType, query, datasourceName);
}
return source.generateDomain();
} catch (Exception e) {
logger.error(e);
throw new Exception(e.getLocalizedMessage());
}
}
Aggregations