use of org.hibernate.mapping.SingleTableSubclass in project jbosstools-hibernate by jbosstools.
the class ServiceImpl method newSingleTableSubclass.
@Override
public IPersistentClass newSingleTableSubclass(IPersistentClass persistentClass) {
assert persistentClass instanceof IFacade;
IPersistentClass result = facadeFactory.createPersistentClass(new SingleTableSubclass((PersistentClass) ((IFacade) persistentClass).getTarget(), null));
((AbstractPersistentClassFacade) result).setSuperClass(persistentClass);
return result;
}
use of org.hibernate.mapping.SingleTableSubclass in project jbosstools-hibernate by jbosstools.
the class ServiceImpl method newSingleTableSubclass.
@Override
public IPersistentClass newSingleTableSubclass(IPersistentClass persistentClass) {
assert persistentClass instanceof IFacade;
IPersistentClass result = facadeFactory.createPersistentClass(new SingleTableSubclass((PersistentClass) ((IFacade) persistentClass).getTarget(), null));
((AbstractPersistentClassFacade) result).setSuperClass(persistentClass);
return result;
}
use of org.hibernate.mapping.SingleTableSubclass in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewSingleTableSubclass.
@Test
public void testNewSingleTableSubclass() {
IPersistentClass persistentClass = service.newRootClass();
IPersistentClass singleTableSublass = service.newSingleTableSubclass(persistentClass);
Assert.assertNotNull(singleTableSublass);
Object target = ((IFacade) singleTableSublass).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof SingleTableSubclass);
Assert.assertSame(persistentClass, singleTableSublass.getSuperclass());
Assert.assertSame(((IFacade) persistentClass).getTarget(), ((SingleTableSubclass) target).getSuperclass());
}
use of org.hibernate.mapping.SingleTableSubclass in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewSingleTableSubclass.
@Test
public void testNewSingleTableSubclass() {
IPersistentClass persistentClass = service.newRootClass();
IPersistentClass singleTableSublass = service.newSingleTableSubclass(persistentClass);
Assert.assertNotNull(singleTableSublass);
Object target = ((IFacade) singleTableSublass).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof SingleTableSubclass);
Assert.assertSame(persistentClass, singleTableSublass.getSuperclass());
Assert.assertSame(((IFacade) persistentClass).getTarget(), ((SingleTableSubclass) target).getSuperclass());
}
use of org.hibernate.mapping.SingleTableSubclass in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewSingleTableSubclass.
@Test
public void testNewSingleTableSubclass() {
IPersistentClass persistentClass = service.newRootClass();
IPersistentClass singleTableSublass = service.newSingleTableSubclass(persistentClass);
Assert.assertNotNull(singleTableSublass);
Object target = ((IFacade) singleTableSublass).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof SingleTableSubclass);
Assert.assertSame(persistentClass, singleTableSublass.getSuperclass());
Assert.assertSame(((IFacade) persistentClass).getTarget(), ((SingleTableSubclass) target).getSuperclass());
}
Aggregations