use of org.jboss.tools.hibernate.runtime.spi.IPersistentClass in project jbosstools-hibernate by jbosstools.
the class PersistentClassViewAdapter method createInheritanceAssociations.
private void createInheritanceAssociations() {
IPersistentClass superclass = getPersistentClass().getSuperclass();
if (superclass != null) {
PersistentClassViewAdapter target = getConfiguration().getPersistentClassViewAdapter(superclass.getEntityName());
InheritanceViewAdapter iva = new InheritanceViewAdapter(this, target);
this.addSourceAssociation(iva);
target.addTargetAssociation(iva);
}
}
use of org.jboss.tools.hibernate.runtime.spi.IPersistentClass in project jbosstools-hibernate by jbosstools.
the class AbstractConfigurationFacade method initializeClassMappings.
protected void initializeClassMappings() {
HashMap<String, IPersistentClass> classMappings = new HashMap<String, IPersistentClass>();
Iterator<?> origin = (Iterator<?>) Util.invokeMethod(getTarget(), "getClassMappings", new Class[] {}, new Object[] {});
while (origin.hasNext()) {
IPersistentClass pc = getFacadeFactory().createPersistentClass(origin.next());
classMappings.put(pc.getEntityName(), pc);
}
setClassMappings(classMappings);
}
use of org.jboss.tools.hibernate.runtime.spi.IPersistentClass 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.jboss.tools.hibernate.runtime.spi.IPersistentClass 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.jboss.tools.hibernate.runtime.spi.IPersistentClass in project jbosstools-hibernate by jbosstools.
the class ConfigurationFacadeImpl method initializeClassMappings.
@Override
protected void initializeClassMappings() {
HashMap<String, IPersistentClass> classMappings = new HashMap<String, IPersistentClass>();
Iterator<PersistentClass> origin = getMetadata().getEntityBindings().iterator();
while (origin.hasNext()) {
IPersistentClass pc = getFacadeFactory().createPersistentClass(origin.next());
classMappings.put(pc.getEntityName(), pc);
}
for (IPersistentClass pc : addedClasses) {
classMappings.put(pc.getEntityName(), pc);
}
setClassMappings(classMappings);
}
Aggregations