Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/tools/codegen
In directory sc8-pr-cvs1:/tmp/cvs-serv19832/hibernate/tools/codegen
Modified Files:
ClassMapping.java
Log Message:
more work on infoString() stuff
integrated setter location patch by Alex Staubo
integrated composite-element codegen patch by Wolfgang Jung
Index: ClassMapping.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/tools/codegen/ClassMapping.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** ClassMapping.java 28 Nov 2002 12:33:34 -0000 1.17
--- ClassMapping.java 7 Dec 2002 08:10:24 -0000 1.18
***************
*** 302,305 ****
--- 302,322 ----
fields.add(new Field(name, interfaceClassName.getName(), "new " + implementingClassName.getName() + "()", false) );
+ if (collection.getChildren("composite-element") != null) {
+ for (Iterator compositeElements = collection.getChildren("composite-element").iterator(); compositeElements.hasNext(); ) {
+ Element compositeElement = (Element) compositeElements.next();
+ String compClass = compositeElement.getAttributeValue("class");
+
+ try {
+ ClassMapping mapping = new ClassMapping(compositeElement, true);
+ ClassName classType = new ClassName();
+ classType.setFullyQualifiedName(compClass);
+ // add an import and field for this property
+ addImport(classType);
+ components.put( mapping.getCanonicalName(), mapping );
+ } catch (Exception e) {
+ System.err.println("Error building composite-element " + compClass);
+ }
+ }
+ }
}
}
|