Search in sources :

Example 11 with IHQLCodeAssist

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

the class FacadeFactoryTest method testCreateHQLCodeAssist.

@Test
public void testCreateHQLCodeAssist() {
    Configuration configuration = new Configuration();
    configuration.setProperty("hibernate.dialect", "org.hibernate.dialect.H2Dialect");
    HQLCodeAssist hqlCodeAssist = new HQLCodeAssist(configuration);
    IHQLCodeAssist facade = facadeFactory.createHQLCodeAssist(hqlCodeAssist);
    Assert.assertSame(hqlCodeAssist, ((IFacade) facade).getTarget());
}
Also used : HQLCodeAssist(org.hibernate.tool.ide.completion.HQLCodeAssist) IHQLCodeAssist(org.jboss.tools.hibernate.runtime.spi.IHQLCodeAssist) IConfiguration(org.jboss.tools.hibernate.runtime.spi.IConfiguration) Configuration(org.hibernate.cfg.Configuration) IHQLCodeAssist(org.jboss.tools.hibernate.runtime.spi.IHQLCodeAssist) Test(org.junit.Test)

Example 12 with IHQLCodeAssist

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

the class FacadeFactoryTest method testCreateHQLCodeAssist.

@Test
public void testCreateHQLCodeAssist() {
    HQLCodeAssist hqlCodeAssist = new HQLCodeAssist(new Configuration());
    IHQLCodeAssist facade = facadeFactory.createHQLCodeAssist(hqlCodeAssist);
    Assert.assertSame(hqlCodeAssist, ((IFacade) facade).getTarget());
}
Also used : HQLCodeAssist(org.hibernate.tool.ide.completion.HQLCodeAssist) IHQLCodeAssist(org.jboss.tools.hibernate.runtime.spi.IHQLCodeAssist) IConfiguration(org.jboss.tools.hibernate.runtime.spi.IConfiguration) Configuration(org.hibernate.cfg.Configuration) IHQLCodeAssist(org.jboss.tools.hibernate.runtime.spi.IHQLCodeAssist) Test(org.junit.Test)

Example 13 with IHQLCodeAssist

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

the class FacadeFactoryTest method testCreateHQLCodeAssist.

@Test
public void testCreateHQLCodeAssist() {
    StandardServiceRegistryBuilder ssrb = new StandardServiceRegistryBuilder();
    ssrb.applySetting("hibernate.dialect", "org.hibernate.dialect.H2Dialect");
    HQLCodeAssist hqlCodeAssist = new HQLCodeAssist(new MetadataSources().buildMetadata(ssrb.build()));
    IHQLCodeAssist facade = facadeFactory.createHQLCodeAssist(hqlCodeAssist);
    Assert.assertSame(hqlCodeAssist, ((IFacade) facade).getTarget());
}
Also used : HQLCodeAssist(org.hibernate.tool.ide.completion.HQLCodeAssist) IHQLCodeAssist(org.jboss.tools.hibernate.runtime.spi.IHQLCodeAssist) StandardServiceRegistryBuilder(org.hibernate.boot.registry.StandardServiceRegistryBuilder) IHQLCodeAssist(org.jboss.tools.hibernate.runtime.spi.IHQLCodeAssist) MetadataSources(org.hibernate.boot.MetadataSources) Test(org.junit.Test)

Aggregations

IHQLCodeAssist (org.jboss.tools.hibernate.runtime.spi.IHQLCodeAssist)13 Test (org.junit.Test)12 HQLCodeAssist (org.hibernate.tool.ide.completion.HQLCodeAssist)8 IConfiguration (org.jboss.tools.hibernate.runtime.spi.IConfiguration)7 Configuration (org.hibernate.cfg.Configuration)3 MetadataSources (org.hibernate.boot.MetadataSources)1 StandardServiceRegistryBuilder (org.hibernate.boot.registry.StandardServiceRegistryBuilder)1 HibernateException (org.jboss.tools.hibernate.runtime.spi.HibernateException)1