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);
}
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);
}
use of org.jboss.tools.hibernate.runtime.spi.IPersistentClass in project jbosstools-hibernate by jbosstools.
the class ElementsFactory method createShape.
protected OrmShape createShape(Object ormElement) {
OrmShape ormShape = null;
if (ormElement instanceof IProperty) {
IPersistentClass specialRootClass = getService().newSpecialRootClass((IProperty) ormElement);
String key = Utils.getName(specialRootClass.getEntityName());
ormShape = elements.get(key);
if (null == ormShape) {
ormShape = new SpecialOrmShape(specialRootClass, consoleConfigName);
elements.put(key, ormShape);
}
} else {
String key = Utils.getName(ormElement);
ormShape = elements.get(key);
if (null == ormShape) {
ormShape = new OrmShape(ormElement, consoleConfigName);
elements.put(key, ormShape);
}
}
return ormShape;
}
Aggregations