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