Search in sources :

Example 1 with TableFactory

use of org.entando.entando.aps.system.init.util.TableFactory in project entando-engine by entando.

the class DatabaseManager method createTables.

private void createTables(String databaseName, List<String> tableClassNames, DataSource dataSource, DataSourceInstallationReport schemaReport) throws EntException {
    try {
        DatabaseType type = this.getDatabaseRestorer().getType(dataSource);
        TableFactory tableFactory = new TableFactory(databaseName, dataSource, type);
        tableFactory.createTables(tableClassNames, schemaReport);
    } catch (Throwable t) {
        logger.error("Error creating tables to db {}", databaseName, t);
        throw new EntException("Error creating tables to db " + databaseName, t);
    }
}
Also used : TableFactory(org.entando.entando.aps.system.init.util.TableFactory) EntException(org.entando.entando.ent.exception.EntException)

Example 2 with TableFactory

use of org.entando.entando.aps.system.init.util.TableFactory in project entando-core by entando.

the class DatabaseManager method createTables.

private void createTables(String databaseName, List<String> tableClassNames, DataSource dataSource, DataSourceInstallationReport schemaReport) throws ApsSystemException {
    try {
        DatabaseType type = this.getDatabaseRestorer().getType(dataSource);
        TableFactory tableFactory = new TableFactory(databaseName, dataSource, type);
        tableFactory.createTables(tableClassNames, schemaReport);
    } catch (Throwable t) {
        logger.error("Error creating tables to db {}", databaseName, t);
        throw new ApsSystemException("Error creating tables to db " + databaseName, t);
    }
}
Also used : TableFactory(org.entando.entando.aps.system.init.util.TableFactory) ApsSystemException(com.agiletec.aps.system.exception.ApsSystemException)

Aggregations

TableFactory (org.entando.entando.aps.system.init.util.TableFactory)2 ApsSystemException (com.agiletec.aps.system.exception.ApsSystemException)1 EntException (org.entando.entando.ent.exception.EntException)1