use of org.hibernate.metadata.CollectionMetadata in project jbosstools-hibernate by jbosstools.
the class FacadeFactoryTest method testCreateCollectionMetadata.
@Test
public void testCreateCollectionMetadata() {
CollectionMetadata collectionMetadata = (CollectionMetadata) Proxy.newProxyInstance(facadeFactory.getClassLoader(), new Class[] { CollectionMetadata.class }, new TestInvocationHandler());
ICollectionMetadata facade = facadeFactory.createCollectionMetadata(collectionMetadata);
Assert.assertSame(collectionMetadata, ((IFacade) facade).getTarget());
}
use of org.hibernate.metadata.CollectionMetadata in project jbosstools-hibernate by jbosstools.
the class FacadeFactoryTest method testCreateCollectionMetadata.
@Test
public void testCreateCollectionMetadata() {
CollectionMetadata collectionMetadata = (CollectionMetadata) Proxy.newProxyInstance(facadeFactory.getClassLoader(), new Class[] { CollectionMetadata.class }, new TestInvocationHandler());
ICollectionMetadata facade = facadeFactory.createCollectionMetadata(collectionMetadata);
Assert.assertSame(collectionMetadata, ((IFacade) facade).getTarget());
}
use of org.hibernate.metadata.CollectionMetadata in project jbosstools-hibernate by jbosstools.
the class FacadeFactoryTest method testCreateCollectionMetadata.
@Test
public void testCreateCollectionMetadata() {
CollectionMetadata collectionMetadata = (CollectionMetadata) Proxy.newProxyInstance(facadeFactory.getClassLoader(), new Class[] { CollectionMetadata.class }, new TestInvocationHandler());
ICollectionMetadata facade = facadeFactory.createCollectionMetadata(collectionMetadata);
Assert.assertSame(collectionMetadata, ((IFacade) facade).getTarget());
}
use of org.hibernate.metadata.CollectionMetadata in project jbosstools-hibernate by jbosstools.
the class SessionFactoryFacadeTest method testGetCollectionMetadata.
@Test
public void testGetCollectionMetadata() {
Configuration configuration = new Configuration();
configuration.addClass(Foo.class);
SessionFactory sessionFactory = configuration.buildSessionFactory(new StandardServiceRegistryBuilder().build());
ISessionFactory sessionFactoryFacade = FACADE_FACTORY.createSessionFactory(sessionFactory);
CollectionMetadata collectionMetadata = sessionFactory.getCollectionMetadata("org.jboss.tools.hibernate.runtime.v_5_0.internal.test.Foo.bars");
Assert.assertSame(collectionMetadata, ((IFacade) sessionFactoryFacade.getCollectionMetadata("org.jboss.tools.hibernate.runtime.v_5_0.internal.test.Foo.bars")).getTarget());
}
use of org.hibernate.metadata.CollectionMetadata in project jbosstools-hibernate by jbosstools.
the class SessionFactoryFacadeTest method testGetCollectionMetadata.
@Test
public void testGetCollectionMetadata() {
Configuration configuration = new Configuration();
configuration.addClass(Foo.class);
ServiceRegistry serviceRegistry = new ServiceRegistryBuilder().buildServiceRegistry();
SessionFactory sessionFactory = configuration.buildSessionFactory(serviceRegistry);
ISessionFactory sessionFactoryFacade = FACADE_FACTORY.createSessionFactory(sessionFactory);
CollectionMetadata collectionMetadata = sessionFactory.getCollectionMetadata("org.jboss.tools.hibernate.runtime.v_4_0.internal.test.Foo.bars");
Assert.assertSame(collectionMetadata, ((IFacade) sessionFactoryFacade.getCollectionMetadata("org.jboss.tools.hibernate.runtime.v_4_0.internal.test.Foo.bars")).getTarget());
}
Aggregations