Author: mdryakhlenkov
Date: 2007-07-03 07:24:05 -0400 (Tue, 03 Jul 2007)
New Revision: 2250
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmShape.java
Log:
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmShape.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmShape.java 2007-07-03
09:47:44 UTC (rev 2249)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/model/OrmShape.java 2007-07-03
11:24:05 UTC (rev 2250)
@@ -87,7 +87,23 @@
}
}
} else if (ormElement instanceof SingleTableSubclass) {
- Iterator iterator =
((SingleTableSubclass)ormElement).getRootClass().getPropertyIterator();
+ RootClass rootClass = ((SingleTableSubclass)ormElement).getRootClass();
+
+ Property identifierProperty = rootClass.getIdentifierProperty();
+ if (identifierProperty != null) {
+ shapes.add(new Shape(identifierProperty));
+ }
+
+ KeyValue identifier = rootClass.getIdentifier();
+ if (identifier instanceof Component) {
+ Iterator iterator = ((Component)identifier).getPropertyIterator();
+ while (iterator.hasNext()) {
+ Property property = (Property) iterator.next();
+ shapes.add(new Shape(property));
+ }
+ }
+
+ Iterator iterator = rootClass.getPropertyIterator();
while (iterator.hasNext()) {
Property field = (Property)iterator.next();
if (!field.isComposite()) {
@@ -115,6 +131,18 @@
}
}
}
+ Iterator iter = ((SingleTableSubclass)ormElement).getPropertyIterator();
+ while (iter.hasNext()) {
+ Property property = (Property)iter.next();
+ if (property.getValue().getType().isEntityType()) {
+ bodyOrmShape = new ExpandeableShape(property);
+ } else if (property.getValue().getType().isCollectionType()) {
+ bodyOrmShape = new ComponentShape(property);
+ } else {
+ bodyOrmShape = new Shape(property);
+ }
+ shapes.add(bodyOrmShape);
+ }
} else if (ormElement instanceof Table) {
Iterator iterator = ((Table)getOrmElement()).getColumnIterator();
while (iterator.hasNext()) {
Show replies by date