Search in sources :

Example 11 with IExporter

use of org.jboss.tools.hibernate.runtime.spi.IExporter in project jbosstools-hibernate by jbosstools.

the class ServiceImplTest method testCreateExporter.

@Test
public void testCreateExporter() {
    IExporter exporter = service.createExporter("org.hibernate.tool.hbm2x.POJOExporter");
    Assert.assertNotNull(exporter);
    Object target = ((IFacade) exporter).getTarget();
    Assert.assertNotNull(target);
    Assert.assertTrue(target instanceof POJOExporter);
}
Also used : POJOExporter(org.hibernate.tool.hbm2x.POJOExporter) IExporter(org.jboss.tools.hibernate.runtime.spi.IExporter) IFacade(org.jboss.tools.hibernate.runtime.common.IFacade) Test(org.junit.Test)

Example 12 with IExporter

use of org.jboss.tools.hibernate.runtime.spi.IExporter 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());
}
Also used : PersistentClass(org.hibernate.mapping.PersistentClass) RootClass(org.hibernate.mapping.RootClass) IPersistentClass(org.jboss.tools.hibernate.runtime.spi.IPersistentClass) POJOClass(org.hibernate.tool.hbm2x.pojo.POJOClass) IPOJOClass(org.jboss.tools.hibernate.runtime.spi.IPOJOClass) IExporter(org.jboss.tools.hibernate.runtime.spi.IExporter) IHibernateMappingExporter(org.jboss.tools.hibernate.runtime.spi.IHibernateMappingExporter) QueryExporter(org.hibernate.tool.hbm2x.QueryExporter) HibernateMappingExporter(org.hibernate.tool.hbm2x.HibernateMappingExporter) Hbm2DDLExporter(org.hibernate.tool.hbm2x.Hbm2DDLExporter) IQueryExporter(org.jboss.tools.hibernate.runtime.spi.IQueryExporter) IGenericExporter(org.jboss.tools.hibernate.runtime.spi.IGenericExporter) GenericExporter(org.hibernate.tool.hbm2x.GenericExporter) Exporter(org.hibernate.tool.hbm2x.Exporter) IHbm2DDLExporter(org.jboss.tools.hibernate.runtime.spi.IHbm2DDLExporter) IExporter(org.jboss.tools.hibernate.runtime.spi.IExporter) Test(org.junit.Test)

Example 13 with IExporter

use of org.jboss.tools.hibernate.runtime.spi.IExporter 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());
}
Also used : PersistentClass(org.hibernate.mapping.PersistentClass) IPOJOClass(org.jboss.tools.hibernate.runtime.spi.IPOJOClass) RootClass(org.hibernate.mapping.RootClass) IPersistentClass(org.jboss.tools.hibernate.runtime.spi.IPersistentClass) POJOClass(org.hibernate.tool.hbm2x.pojo.POJOClass) IExporter(org.jboss.tools.hibernate.runtime.spi.IExporter) QueryExporter(org.hibernate.tool.hbm2x.QueryExporter) HibernateMappingExporter(org.hibernate.tool.hbm2x.HibernateMappingExporter) Hbm2DDLExporter(org.hibernate.tool.hbm2x.Hbm2DDLExporter) IQueryExporter(org.jboss.tools.hibernate.runtime.spi.IQueryExporter) Exporter(org.hibernate.tool.hbm2x.Exporter) IHibernateMappingExporter(org.jboss.tools.hibernate.runtime.spi.IHibernateMappingExporter) IGenericExporter(org.jboss.tools.hibernate.runtime.spi.IGenericExporter) GenericExporter(org.hibernate.tool.hbm2x.GenericExporter) IHbm2DDLExporter(org.jboss.tools.hibernate.runtime.spi.IHbm2DDLExporter) IExporter(org.jboss.tools.hibernate.runtime.spi.IExporter) Test(org.junit.Test)

Example 14 with IExporter

use of org.jboss.tools.hibernate.runtime.spi.IExporter 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());
}
Also used : PersistentClass(org.hibernate.mapping.PersistentClass) IPOJOClass(org.jboss.tools.hibernate.runtime.spi.IPOJOClass) RootClass(org.hibernate.mapping.RootClass) IPersistentClass(org.jboss.tools.hibernate.runtime.spi.IPersistentClass) POJOClass(org.hibernate.tool.hbm2x.pojo.POJOClass) IExporter(org.jboss.tools.hibernate.runtime.spi.IExporter) QueryExporter(org.hibernate.tool.hbm2x.QueryExporter) HibernateMappingExporter(org.hibernate.tool.hbm2x.HibernateMappingExporter) Hbm2DDLExporter(org.hibernate.tool.hbm2x.Hbm2DDLExporter) IQueryExporter(org.jboss.tools.hibernate.runtime.spi.IQueryExporter) Exporter(org.hibernate.tool.hbm2x.Exporter) IHibernateMappingExporter(org.jboss.tools.hibernate.runtime.spi.IHibernateMappingExporter) IGenericExporter(org.jboss.tools.hibernate.runtime.spi.IGenericExporter) GenericExporter(org.hibernate.tool.hbm2x.GenericExporter) IHbm2DDLExporter(org.jboss.tools.hibernate.runtime.spi.IHbm2DDLExporter) IExporter(org.jboss.tools.hibernate.runtime.spi.IExporter) Test(org.junit.Test)

Example 15 with IExporter

use of org.jboss.tools.hibernate.runtime.spi.IExporter in project jbosstools-hibernate by jbosstools.

the class ServiceImplTest method testCreateExporter.

@Test
public void testCreateExporter() {
    IExporter exporter = service.createExporter("org.hibernate.tool.hbm2x.POJOExporter");
    Assert.assertNotNull(exporter);
    Object target = ((IFacade) exporter).getTarget();
    Assert.assertNotNull(target);
    Assert.assertTrue(target instanceof POJOExporter);
}
Also used : POJOExporter(org.hibernate.tool.hbm2x.POJOExporter) IExporter(org.jboss.tools.hibernate.runtime.spi.IExporter) IFacade(org.jboss.tools.hibernate.runtime.common.IFacade) Test(org.junit.Test)

Aggregations

IExporter (org.jboss.tools.hibernate.runtime.spi.IExporter)18 Test (org.junit.Test)12 IGenericExporter (org.jboss.tools.hibernate.runtime.spi.IGenericExporter)10 IHbm2DDLExporter (org.jboss.tools.hibernate.runtime.spi.IHbm2DDLExporter)10 Exporter (org.hibernate.tool.hbm2x.Exporter)9 IHibernateMappingExporter (org.jboss.tools.hibernate.runtime.spi.IHibernateMappingExporter)9 IQueryExporter (org.jboss.tools.hibernate.runtime.spi.IQueryExporter)9 PersistentClass (org.hibernate.mapping.PersistentClass)8 RootClass (org.hibernate.mapping.RootClass)8 GenericExporter (org.hibernate.tool.hbm2x.GenericExporter)8 Hbm2DDLExporter (org.hibernate.tool.hbm2x.Hbm2DDLExporter)8 HibernateMappingExporter (org.hibernate.tool.hbm2x.HibernateMappingExporter)8 QueryExporter (org.hibernate.tool.hbm2x.QueryExporter)8 POJOClass (org.hibernate.tool.hbm2x.pojo.POJOClass)8 IPOJOClass (org.jboss.tools.hibernate.runtime.spi.IPOJOClass)8 IPersistentClass (org.jboss.tools.hibernate.runtime.spi.IPersistentClass)8 Properties (java.util.Properties)4 POJOExporter (org.hibernate.tool.hbm2x.POJOExporter)4 IFacade (org.jboss.tools.hibernate.runtime.common.IFacade)4 CoreException (org.eclipse.core.runtime.CoreException)3