Index: topia/src/java/org/codelutin/topia/generators/jdo/ObjectModelToJDOEntityGenerator.java diff -u topia/src/java/org/codelutin/topia/generators/jdo/ObjectModelToJDOEntityGenerator.java:1.12 topia/src/java/org/codelutin/topia/generators/jdo/ObjectModelToJDOEntityGenerator.java:1.13 --- topia/src/java/org/codelutin/topia/generators/jdo/ObjectModelToJDOEntityGenerator.java:1.12 Thu May 26 14:19:28 2005 +++ topia/src/java/org/codelutin/topia/generators/jdo/ObjectModelToJDOEntityGenerator.java Fri Jun 10 08:21:58 2005 @@ -23,9 +23,9 @@ * * @author Benjamin Poussin * Copyright Code Lutin - * @version $Revision: 1.12 $ + * @version $Revision: 1.13 $ * - * Mise a jour: $Date: 2005/05/26 14:19:28 $ + * Mise a jour: $Date: 2005/06/10 08:21:58 $ * par : $Author: thimel $ */ @@ -111,7 +111,7 @@ hasParent = i.hasNext(); if (hasParent) { ObjectModelClass superclass = (ObjectModelClass) i.next(); - /*{ extends <%=superclass.getName()%>JDO}*/ + /*{ extends <%=superclass.getPackageName()%>.persistence.jdo.<%=superclass.getName()%>JDO}*/ } /*{ implements JDOEntity}*/ }else{ @@ -122,7 +122,7 @@ for (Iterator i = clazzifier.getInterfaces().iterator(); i.hasNext();) { ObjectModelInterface interfacezz = (ObjectModelInterface) i.next(); if (Util.isEntity(interfacezz)) { - /*{, <%=interfacezz.getName()%>JDO }*/ + /*{, <%=interfacezz.getPackageName()%>.persistence.jdo.<%=interfacezz.getName()%>JDO }*/ } } } @@ -375,8 +375,15 @@ if(<%=attribute.getName()%> == null){ entity.set<%=Util.capitalize(attribute.getName())%>(null); }else{ - entity.set<%=Util.capitalize(attribute.getName())%>((<%=attribute.getType()%>) <%=attribute.getName()%>.getLazy(getContext())); - // TODO entity.set<%=Util.capitalize(attribute.getName())%>(new <%=Util.getLazyClassName(attribute.getType())%>(getContext(), <%=attribute.getName()%>.get_topiaId_(), <%=attribute.getName()%>.get_version_())); +}*/ + if (attribute.hasAssociationClass()) { +/*{ entity.set<%=Util.capitalize(attribute.getName())%>((<%=attribute.getAssociationClass().getQualifiedName()%>) <%=attribute.getName()%>.getLazy(getContext())); +}*/ + } else { +/*{ entity.set<%=Util.capitalize(attribute.getName())%>((<%=attribute.getType()%>) <%=attribute.getName()%>.getLazy(getContext())); +}*/ + } +/*{ // TODO entity.set<%=Util.capitalize(attribute.getName())%>(new <%=Util.getLazyClassName(attribute.getType())%>(getContext(), <%=attribute.getName()%>.get_topiaId_(), <%=attribute.getName()%>.get_version_())); } }*/ } @@ -391,8 +398,15 @@ /*{ for(Iterator i=<%=attribute.getName()%>.iterator(); i.hasNext();){ JDOEntity e = (JDOEntity)i.next(); - entity.add<%=Util.capitalize(attribute.getName())%>((<%=attribute.getType()%>) e.getLazy(getContext())); - // TODO entity.add<%=Util.capitalize(attribute.getName())%>(new <%=Util.getLazyClassName(attribute.getType())%>(getContext(), e.get_topiaId_(), e.get_version_())); +}*/ + if (attribute.hasAssociationClass()) { +/*{ entity.add<%=Util.capitalize(attribute.getName())%>((<%=attribute.getAssociationClass().getQualifiedName()%>)e.getLazy(getContext())); +}*/ + } else { +/*{ entity.add<%=Util.capitalize(attribute.getName())%>((<%=attribute.getType()%>) e.getLazy(getContext())); +}*/ + } +/*{ // TODO entity.add<%=Util.capitalize(attribute.getName())%>(new <%=Util.getLazyClassName(attribute.getType())%>(getContext(), e.get_topiaId_(), e.get_version_())); } }*/ }