Search in sources :

Example 6 with IQueryTranslator

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

the class FacadeFactoryTest method testCreateQueryTranslator.

@Test
public void testCreateQueryTranslator() {
    QueryTranslator queryTranslator = (QueryTranslator) Proxy.newProxyInstance(facadeFactory.getClassLoader(), new Class[] { QueryTranslator.class }, new TestInvocationHandler());
    IQueryTranslator facade = facadeFactory.createQueryTranslator(queryTranslator);
    Assert.assertSame(queryTranslator, ((IFacade) facade).getTarget());
}
Also used : 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) IQueryTranslator(org.jboss.tools.hibernate.runtime.spi.IQueryTranslator) QueryTranslator(org.hibernate.hql.spi.QueryTranslator) IQueryTranslator(org.jboss.tools.hibernate.runtime.spi.IQueryTranslator) Test(org.junit.Test)

Example 7 with IQueryTranslator

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

the class FacadeFactoryTest method testCreateQueryTranslator.

@Test
public void testCreateQueryTranslator() {
    QueryTranslator queryTranslator = (QueryTranslator) Proxy.newProxyInstance(facadeFactory.getClassLoader(), new Class[] { QueryTranslator.class }, new TestInvocationHandler());
    IQueryTranslator facade = facadeFactory.createQueryTranslator(queryTranslator);
    Assert.assertSame(queryTranslator, ((IFacade) facade).getTarget());
}
Also used : 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) IQueryTranslator(org.jboss.tools.hibernate.runtime.spi.IQueryTranslator) QueryTranslator(org.hibernate.hql.spi.QueryTranslator) IQueryTranslator(org.jboss.tools.hibernate.runtime.spi.IQueryTranslator) Test(org.junit.Test)

Example 8 with IQueryTranslator

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

the class FacadeFactoryTest method testCreateQueryTranslator.

@Test
public void testCreateQueryTranslator() {
    QueryTranslator queryTranslator = (QueryTranslator) Proxy.newProxyInstance(facadeFactory.getClassLoader(), new Class[] { QueryTranslator.class }, new TestInvocationHandler());
    IQueryTranslator facade = facadeFactory.createQueryTranslator(queryTranslator);
    Assert.assertSame(queryTranslator, ((IFacade) facade).getTarget());
}
Also used : 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) IQueryTranslator(org.jboss.tools.hibernate.runtime.spi.IQueryTranslator) QueryTranslator(org.hibernate.hql.spi.QueryTranslator) IQueryTranslator(org.jboss.tools.hibernate.runtime.spi.IQueryTranslator) Test(org.junit.Test)

Example 9 with IQueryTranslator

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

the class FacadeFactoryTest method testCreateQueryTranslator.

@Test
public void testCreateQueryTranslator() {
    QueryTranslator queryTranslator = (QueryTranslator) Proxy.newProxyInstance(facadeFactory.getClassLoader(), new Class[] { QueryTranslator.class }, new TestInvocationHandler());
    IQueryTranslator facade = facadeFactory.createQueryTranslator(queryTranslator);
    Assert.assertSame(queryTranslator, ((IFacade) facade).getTarget());
}
Also used : 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) IQueryTranslator(org.jboss.tools.hibernate.runtime.spi.IQueryTranslator) QueryTranslator(org.hibernate.hql.spi.QueryTranslator) IQueryTranslator(org.jboss.tools.hibernate.runtime.spi.IQueryTranslator) Test(org.junit.Test)

Aggregations

IQueryTranslator (org.jboss.tools.hibernate.runtime.spi.IQueryTranslator)9 PersistentClass (org.hibernate.mapping.PersistentClass)8 RootClass (org.hibernate.mapping.RootClass)8 POJOClass (org.hibernate.tool.hbm2x.pojo.POJOClass)8 IPOJOClass (org.jboss.tools.hibernate.runtime.spi.IPOJOClass)8 IPersistentClass (org.jboss.tools.hibernate.runtime.spi.IPersistentClass)8 Test (org.junit.Test)8 QueryTranslator (org.hibernate.hql.spi.QueryTranslator)6 QueryTranslator (org.hibernate.hql.QueryTranslator)2 IHQLQueryPlan (org.jboss.tools.hibernate.runtime.spi.IHQLQueryPlan)1 IType (org.jboss.tools.hibernate.runtime.spi.IType)1