use of org.hibernate.mapping.SingleTableSubclass in project jbosstools-hibernate by jbosstools.
the class PersistentClassFacadeTest method testIsAssignableToRootClass.
@Test
public void testIsAssignableToRootClass() {
persistentClassTarget = new SingleTableSubclass(new RootClass(null), null);
persistentClassFacade = new PersistentClassFacadeImpl(FACADE_FACTORY, persistentClassTarget);
assertFalse(persistentClassFacade.isAssignableToRootClass());
persistentClassTarget = new RootClass(null);
persistentClassFacade = new PersistentClassFacadeImpl(FACADE_FACTORY, persistentClassTarget);
assertTrue(persistentClassFacade.isAssignableToRootClass());
}
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 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 PersistentClassFacadeTest method testIsRootClass.
@Test
public void testIsRootClass() {
persistentClassTarget = new SingleTableSubclass(new RootClass(null), null);
persistentClassFacade = new PersistentClassFacadeImpl(FACADE_FACTORY, persistentClassTarget);
assertFalse(persistentClassFacade.isRootClass());
persistentClassTarget = new RootClass(null);
persistentClassFacade = new PersistentClassFacadeImpl(FACADE_FACTORY, persistentClassTarget);
assertTrue(persistentClassFacade.isRootClass());
}
Aggregations