use of org.jboss.tools.hibernate.runtime.spi.ISchemaExport in project jbosstools-hibernate by jbosstools.
the class ServiceImpl method newSchemaExport.
@Override
public ISchemaExport newSchemaExport(IConfiguration hcfg) {
ISchemaExport result = null;
if (hcfg instanceof IFacade) {
SchemaExport schemaExport = new SchemaExport((Configuration) ((IFacade) hcfg).getTarget());
result = facadeFactory.createSchemaExport(schemaExport);
}
return result;
}
use of org.jboss.tools.hibernate.runtime.spi.ISchemaExport in project jbosstools-hibernate by jbosstools.
the class ServiceImpl method newSchemaExport.
@Override
public ISchemaExport newSchemaExport(IConfiguration hcfg) {
ISchemaExport result = null;
if (hcfg instanceof IFacade) {
SchemaExport schemaExport = new SchemaExport((Configuration) ((IFacade) hcfg).getTarget());
result = facadeFactory.createSchemaExport(schemaExport);
}
return result;
}
use of org.jboss.tools.hibernate.runtime.spi.ISchemaExport in project jbosstools-hibernate by jbosstools.
the class ServiceImpl method newSchemaExport.
@Override
public ISchemaExport newSchemaExport(IConfiguration hcfg) {
ISchemaExport result = null;
if (hcfg instanceof IFacade) {
SchemaExport schemaExport = new SchemaExport((Configuration) ((IFacade) hcfg).getTarget());
result = facadeFactory.createSchemaExport(schemaExport);
}
return result;
}
use of org.jboss.tools.hibernate.runtime.spi.ISchemaExport in project jbosstools-hibernate by jbosstools.
the class SchemaExportFacadeTest method testCreate.
@Test
public void testCreate() throws Exception {
String urlString = "jdbc:h2:mem:create_test";
Connection connection = DriverManager.getConnection(urlString);
configuration.setProperty(Environment.URL, urlString);
ISchemaExport schemaExportFacade = FACADE_FACTORY.createSchemaExport(new SchemaExport(configuration));
Assert.assertFalse(connection.getMetaData().getTables(null, null, "FOO", null).next());
schemaExportFacade.create();
Assert.assertTrue(connection.getMetaData().getTables(null, null, "FOO", null).next());
}
use of org.jboss.tools.hibernate.runtime.spi.ISchemaExport in project jbosstools-hibernate by jbosstools.
the class FacadeFactoryTest method testCreateSchemaExport.
@Test
public void testCreateSchemaExport() {
Configuration configuration = new Configuration();
configuration.setProperty("hibernate.dialect", "org.hibernate.dialect.H2Dialect");
SchemaExport schemaExport = new SchemaExport(configuration);
ISchemaExport facade = facadeFactory.createSchemaExport(schemaExport);
Assert.assertSame(schemaExport, ((IFacade) facade).getTarget());
}
Aggregations