Search in sources :

Example 1 with QueryTranslator

use of org.hibernate.hql.QueryTranslator 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.QueryTranslator) IQueryTranslator(org.jboss.tools.hibernate.runtime.spi.IQueryTranslator) Test(org.junit.Test)

Example 2 with QueryTranslator

use of org.hibernate.hql.QueryTranslator 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.QueryTranslator) IQueryTranslator(org.jboss.tools.hibernate.runtime.spi.IQueryTranslator) Test(org.junit.Test)

Aggregations

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