use of org.hibernate.tool.hbm2x.Exporter in project jbosstools-hibernate by jbosstools.
the class ServiceImpl method createExporter.
@Override
public IExporter createExporter(String exporterClassName) {
Exporter exporter = (Exporter) Util.getInstance(exporterClassName, facadeFactory.getClassLoader());
exporter.setMetadataDescriptor(new ConfigurationMetadataDescriptor(newDefaultConfiguration()));
return facadeFactory.createExporter(exporter);
}
use of org.hibernate.tool.hbm2x.Exporter in project jbosstools-hibernate by jbosstools.
the class FacadeFactoryTest method testCreateExporter.
@Test
public void testCreateExporter() {
Exporter exporter = (Exporter) Proxy.newProxyInstance(facadeFactory.getClassLoader(), new Class[] { Exporter.class }, new TestInvocationHandler());
IExporter facade = facadeFactory.createExporter(exporter);
Assert.assertSame(exporter, ((IFacade) facade).getTarget());
}
use of org.hibernate.tool.hbm2x.Exporter in project jbosstools-hibernate by jbosstools.
the class FacadeFactoryTest method testCreateExporter.
@Test
public void testCreateExporter() {
Exporter exporter = (Exporter) Proxy.newProxyInstance(facadeFactory.getClassLoader(), new Class[] { Exporter.class }, new TestInvocationHandler());
IExporter facade = facadeFactory.createExporter(exporter);
assertSame(exporter, ((IFacade) facade).getTarget());
}
use of org.hibernate.tool.hbm2x.Exporter in project jbosstools-hibernate by jbosstools.
the class FacadeFactoryTest method testCreateExporter.
@Test
public void testCreateExporter() {
Exporter exporter = (Exporter) Proxy.newProxyInstance(facadeFactory.getClassLoader(), new Class[] { Exporter.class }, new TestInvocationHandler());
IExporter facade = facadeFactory.createExporter(exporter);
assertTrue(facade instanceof ExporterFacadeImpl);
assertSame(exporter, ((IFacade) facade).getTarget());
}
use of org.hibernate.tool.hbm2x.Exporter in project jbosstools-hibernate by jbosstools.
the class ExporterFacadeImpl method setConfiguration.
@Override
public void setConfiguration(IConfiguration configuration) {
Exporter exporter = (Exporter) getTarget();
setCustomProperties(configuration.getProperties());
exporter.setMetadataDescriptor(new ConfigurationMetadataDescriptor(configuration));
}
Aggregations