Search in sources :

Example 66 with IFacade

use of org.jboss.tools.hibernate.runtime.common.IFacade in project jbosstools-hibernate by jbosstools.

the class ServiceImplTest method testNewSingleTableSubclass.

@Test
public void testNewSingleTableSubclass() {
    IPersistentClass persistentClass = service.newRootClass();
    IPersistentClass singleTableSublass = service.newSingleTableSubclass(persistentClass);
    Assert.assertNotNull(singleTableSublass);
    Object target = ((IFacade) singleTableSublass).getTarget();
    Assert.assertNotNull(target);
    Assert.assertTrue(target instanceof SingleTableSubclass);
    Assert.assertSame(persistentClass, singleTableSublass.getSuperclass());
    Assert.assertSame(((IFacade) persistentClass).getTarget(), ((SingleTableSubclass) target).getSuperclass());
}
Also used : IFacade(org.jboss.tools.hibernate.runtime.common.IFacade) SingleTableSubclass(org.hibernate.mapping.SingleTableSubclass) IPersistentClass(org.jboss.tools.hibernate.runtime.spi.IPersistentClass) Test(org.junit.Test)

Example 67 with IFacade

use of org.jboss.tools.hibernate.runtime.common.IFacade in project jbosstools-hibernate by jbosstools.

the class ServiceImplTest method testNewArtifactCollector.

@Test
public void testNewArtifactCollector() {
    IArtifactCollector artifactCollector = service.newArtifactCollector();
    Assert.assertNotNull(artifactCollector);
    Object target = ((IFacade) artifactCollector).getTarget();
    Assert.assertNotNull(target);
    Assert.assertTrue(target instanceof ArtifactCollector);
}
Also used : IArtifactCollector(org.jboss.tools.hibernate.runtime.spi.IArtifactCollector) IArtifactCollector(org.jboss.tools.hibernate.runtime.spi.IArtifactCollector) ArtifactCollector(org.hibernate.tool.hbm2x.ArtifactCollector) IFacade(org.jboss.tools.hibernate.runtime.common.IFacade) Test(org.junit.Test)

Example 68 with IFacade

use of org.jboss.tools.hibernate.runtime.common.IFacade in project jbosstools-hibernate by jbosstools.

the class ServiceImplTest method testNewReverseEngineeringSettings.

@Test
public void testNewReverseEngineeringSettings() {
    IReverseEngineeringStrategy strategy = service.newDefaultReverseEngineeringStrategy();
    IReverseEngineeringSettings reverseEngineeringSettings = service.newReverseEngineeringSettings(strategy);
    Assert.assertNotNull(reverseEngineeringSettings);
    Object target = ((IFacade) reverseEngineeringSettings).getTarget();
    Assert.assertNotNull(target);
    Assert.assertTrue(target instanceof ReverseEngineeringSettings);
}
Also used : IReverseEngineeringSettings(org.jboss.tools.hibernate.runtime.spi.IReverseEngineeringSettings) ReverseEngineeringSettings(org.hibernate.cfg.reveng.ReverseEngineeringSettings) IReverseEngineeringSettings(org.jboss.tools.hibernate.runtime.spi.IReverseEngineeringSettings) IReverseEngineeringStrategy(org.jboss.tools.hibernate.runtime.spi.IReverseEngineeringStrategy) IFacade(org.jboss.tools.hibernate.runtime.common.IFacade) Test(org.junit.Test)

Example 69 with IFacade

use of org.jboss.tools.hibernate.runtime.common.IFacade in project jbosstools-hibernate by jbosstools.

the class ServiceImplTest method testNewRootClass.

@Test
public void testNewRootClass() {
    IPersistentClass rootClass = service.newRootClass();
    Assert.assertNotNull(rootClass);
    Object target = ((IFacade) rootClass).getTarget();
    Assert.assertNotNull(target);
    Assert.assertTrue(target instanceof RootClass);
}
Also used : RootClass(org.hibernate.mapping.RootClass) IFacade(org.jboss.tools.hibernate.runtime.common.IFacade) IPersistentClass(org.jboss.tools.hibernate.runtime.spi.IPersistentClass) Test(org.junit.Test)

Example 70 with IFacade

use of org.jboss.tools.hibernate.runtime.common.IFacade in project jbosstools-hibernate by jbosstools.

the class ServiceImplTest method testNewJpaConfiguration.

@Test
public void testNewJpaConfiguration() {
    IConfiguration configuration = service.newJpaConfiguration(null, "test", null);
    Assert.assertNotNull(configuration);
    Object target = ((IFacade) configuration).getTarget();
    Assert.assertNotNull(target);
    Assert.assertTrue(target instanceof Configuration);
}
Also used : JdbcMetadataConfiguration(org.jboss.tools.hibernate.runtime.v_5_3.internal.util.JdbcMetadataConfiguration) Configuration(org.hibernate.cfg.Configuration) IConfiguration(org.jboss.tools.hibernate.runtime.spi.IConfiguration) IConfiguration(org.jboss.tools.hibernate.runtime.spi.IConfiguration) IFacade(org.jboss.tools.hibernate.runtime.common.IFacade) Test(org.junit.Test)

Aggregations

IFacade (org.jboss.tools.hibernate.runtime.common.IFacade)188 Test (org.junit.Test)156 IPersistentClass (org.jboss.tools.hibernate.runtime.spi.IPersistentClass)60 IValue (org.jboss.tools.hibernate.runtime.spi.IValue)40 IConfiguration (org.jboss.tools.hibernate.runtime.spi.IConfiguration)29 Configuration (org.hibernate.cfg.Configuration)20 IReverseEngineeringStrategy (org.jboss.tools.hibernate.runtime.spi.IReverseEngineeringStrategy)20 RootClass (org.hibernate.mapping.RootClass)19 Table (org.hibernate.mapping.Table)15 JDBCMetaDataConfiguration (org.hibernate.cfg.JDBCMetaDataConfiguration)13 File (java.io.File)12 PersistentClass (org.hibernate.mapping.PersistentClass)12 IProperty (org.jboss.tools.hibernate.runtime.spi.IProperty)12 ISessionFactory (org.jboss.tools.hibernate.runtime.spi.ISessionFactory)12 ITable (org.jboss.tools.hibernate.runtime.spi.ITable)11 Field (java.lang.reflect.Field)9 JDBCReader (org.hibernate.cfg.reveng.JDBCReader)9 IJDBCReader (org.jboss.tools.hibernate.runtime.spi.IJDBCReader)9 HashMap (java.util.HashMap)8 Map (java.util.Map)8