Search in sources :

Example 56 with ClassMetadata

use of org.hibernate.metadata.ClassMetadata in project jbosstools-hibernate by jbosstools.

the class FacadeFactoryTest method testCreateClassMetadata.

@Test
public void testCreateClassMetadata() {
    ClassMetadata classMetadata = (ClassMetadata) Proxy.newProxyInstance(facadeFactory.getClassLoader(), new Class[] { ClassMetadata.class }, new TestInvocationHandler());
    IClassMetadata facade = facadeFactory.createClassMetadata(classMetadata);
    assertSame(classMetadata, ((IFacade) facade).getTarget());
}
Also used : ClassMetadata(org.hibernate.metadata.ClassMetadata) IClassMetadata(org.jboss.tools.hibernate.runtime.spi.IClassMetadata) IClassMetadata(org.jboss.tools.hibernate.runtime.spi.IClassMetadata) 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) Test(org.junit.jupiter.api.Test)

Example 57 with ClassMetadata

use of org.hibernate.metadata.ClassMetadata in project jbosstools-hibernate by jbosstools.

the class FacadeFactoryTest method testCreateClassMetadata.

@Test
public void testCreateClassMetadata() {
    ClassMetadata classMetadata = (ClassMetadata) Proxy.newProxyInstance(facadeFactory.getClassLoader(), new Class[] { ClassMetadata.class }, new TestInvocationHandler());
    IClassMetadata facade = facadeFactory.createClassMetadata(classMetadata);
    assertSame(classMetadata, ((IFacade) facade).getTarget());
}
Also used : ClassMetadata(org.hibernate.metadata.ClassMetadata) IClassMetadata(org.jboss.tools.hibernate.runtime.spi.IClassMetadata) IClassMetadata(org.jboss.tools.hibernate.runtime.spi.IClassMetadata) 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) Test(org.junit.jupiter.api.Test)

Example 58 with ClassMetadata

use of org.hibernate.metadata.ClassMetadata in project jbosstools-hibernate by jbosstools.

the class FacadeFactoryTest method testCreateClassMetadata.

@Test
public void testCreateClassMetadata() {
    ClassMetadata classMetadata = (ClassMetadata) Proxy.newProxyInstance(facadeFactory.getClassLoader(), new Class[] { ClassMetadata.class }, new TestInvocationHandler());
    IClassMetadata facade = facadeFactory.createClassMetadata(classMetadata);
    assertTrue(facade instanceof ClassMetadataFacadeImpl);
    assertSame(classMetadata, ((IFacade) facade).getTarget());
}
Also used : ClassMetadata(org.hibernate.metadata.ClassMetadata) IClassMetadata(org.jboss.tools.hibernate.runtime.spi.IClassMetadata) IClassMetadata(org.jboss.tools.hibernate.runtime.spi.IClassMetadata) 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) Test(org.junit.jupiter.api.Test)

Aggregations

ClassMetadata (org.hibernate.metadata.ClassMetadata)58 PersistentClass (org.hibernate.mapping.PersistentClass)23 IClassMetadata (org.jboss.tools.hibernate.runtime.spi.IClassMetadata)21 RootClass (org.hibernate.mapping.RootClass)20 IPOJOClass (org.jboss.tools.hibernate.runtime.spi.IPOJOClass)12 IPersistentClass (org.jboss.tools.hibernate.runtime.spi.IPersistentClass)12 POJOClass (org.hibernate.tool.hbm2x.pojo.POJOClass)11 Test (org.junit.jupiter.api.Test)11 Type (org.hibernate.type.Type)10 Before (org.junit.Before)8 Field (java.lang.reflect.Field)5 AbstractEntityPersister (org.hibernate.persister.entity.AbstractEntityPersister)5 Test (org.junit.Test)5 ArrayList (java.util.ArrayList)4 Session (org.hibernate.Session)4 SessionFactory (org.hibernate.SessionFactory)4 SessionImpl (org.hibernate.internal.SessionImpl)4 ComponentType (org.hibernate.type.ComponentType)4 AbstractClassMetadataFacade (org.jboss.tools.hibernate.runtime.common.AbstractClassMetadataFacade)4 MasterDataEntity (org.mifos.application.master.business.MasterDataEntity)4