use of org.hibernate.metadata.CollectionMetadata in project jbosstools-hibernate by jbosstools.
the class CollectionMetadataFacadeTest method setUp.
@Before
public void setUp() {
CollectionMetadata target = (CollectionMetadata) Proxy.newProxyInstance(FACADE_FACTORY.getClassLoader(), new Class[] { CollectionMetadata.class }, new TestInvocationHandler());
collectionMetadata = new AbstractCollectionMetadataFacade(FACADE_FACTORY, target) {
};
}
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_4_3.internal.test.Foo.bars");
Assert.assertSame(collectionMetadata, ((IFacade) sessionFactoryFacade.getCollectionMetadata("org.jboss.tools.hibernate.runtime.v_4_3.internal.test.Foo.bars")).getTarget());
}
use of org.hibernate.metadata.CollectionMetadata in project jbosstools-hibernate by jbosstools.
the class CollectionMetadataFacadeTest method setUp.
@Before
public void setUp() {
CollectionMetadata target = (CollectionMetadata) Proxy.newProxyInstance(FACADE_FACTORY.getClassLoader(), new Class[] { CollectionMetadata.class }, new TestInvocationHandler());
collectionMetadata = new AbstractCollectionMetadataFacade(FACADE_FACTORY, target) {
};
}
use of org.hibernate.metadata.CollectionMetadata in project jbosstools-hibernate by jbosstools.
the class CollectionMetadataFacadeTest method setUp.
@Before
public void setUp() {
CollectionMetadata target = (CollectionMetadata) Proxy.newProxyInstance(FACADE_FACTORY.getClassLoader(), new Class[] { CollectionMetadata.class }, new TestInvocationHandler());
collectionMetadata = new AbstractCollectionMetadataFacade(FACADE_FACTORY, target) {
};
}
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());
}
Aggregations