public Container importDatabase(Database database, DatabaseImporter importer) {
//Create Container
final Container container = Lookup.getDefault().lookup(ContainerFactory.class).newContainer();
//Report
Report report = new Report();
container.setReport(report);
importer.setDatabase(database);
try {
if (importer.execute(container.getLoader())) {
if (importer.getReport() != null) {
report.append(importer.getReport());
}
return container;
}
} catch (RuntimeException ex) {
throw ex;