Index: topia/src/java/org/codelutin/topia/generators/ObjectModelToEntityGenerator.java diff -u topia/src/java/org/codelutin/topia/generators/ObjectModelToEntityGenerator.java:1.6 topia/src/java/org/codelutin/topia/generators/ObjectModelToEntityGenerator.java:1.7 --- topia/src/java/org/codelutin/topia/generators/ObjectModelToEntityGenerator.java:1.6 Fri Jun 10 08:21:57 2005 +++ topia/src/java/org/codelutin/topia/generators/ObjectModelToEntityGenerator.java Wed Jul 6 22:35:20 2005 @@ -23,10 +23,10 @@ * * @author Benjamin Poussin * Copyright Code Lutin - * @version $Revision: 1.6 $ + * @version $Revision: 1.7 $ * - * Mise a jour: $Date: 2005/06/10 08:21:57 $ - * par : $Author: thimel $ + * Mise a jour: $Date: 2005/07/06 22:35:20 $ + * par : $Author: bpoussin $ */ package org.codelutin.topia.generators; @@ -74,7 +74,7 @@ public interface <%=clazz.getName()%> extends TopiaEntity}*/ for (Iterator i = clazz.getInterfaces().iterator(); i.hasNext();) { ObjectModelInterface interfacezz = (ObjectModelInterface) i.next(); -/*{, }*/ +/*{, }*/ if (!Util.isEntity(interfacezz)) { /*{<%=interfacezz.getPackageName() + "."%>}*/ } @@ -114,11 +114,11 @@ * @return an unmodifiable collection *) public <%=Util.getAttributeType(attribute)%> get<%=Util.capitalize(attribute.getName())%>() throws TopiaException; - + public int sizeOf<%=Util.capitalize(attribute.getName())%>() throws TopiaException; public Iterator iteratorOn<%=Util.capitalize(attribute.getName())%>() throws TopiaException; - + public boolean containsIn<%=Util.capitalize(attribute.getName())%>(<%=attribute.getType()%> value) throws TopiaException; public boolean containsAllIn<%=Util.capitalize(attribute.getName())%>(java.util.Collection values) throws TopiaException; @@ -134,8 +134,8 @@ public <%=attribute.getType()%> get<%=Util.capitalize(attribute.getName())%>() throws TopiaException; }*/ } - - + + ////////////////////////////////////////////////////////////////////// // S E T A T T R I B U T E S A C C E S S O R S ////////////////////////////////////////////////////////////////////// @@ -149,7 +149,7 @@ } else { /*{ public void set<%=Util.capitalize(attribute.getName())%>(<%=attribute.getAssociationClass().getQualifiedName()%> association) throws TopiaException; - + public void set<%=Util.capitalize(attribute.getName())%>(<%=Util.getAttributeType(attribute)%> value, <%=attribute.getAssociationClass().getQualifiedName()%> association) throws TopiaException; }*/ } @@ -173,20 +173,20 @@ public void add<%=Util.capitalize(attribute.getName())%>(/*<%=Util.getAttributeType(attribute)%>*)java.util.Collection list, boolean duplicate) throws TopiaException; }*/ } else { -/*{ +/*{ public void set<%=Util.capitalize(attribute.getName())%>(int index, <%=attribute.getAssociationClass().getQualifiedName()%> value) throws TopiaException; - + public void add<%=Util.capitalize(attribute.getName())%>(<%=attribute.getType()%> value, <%=attribute.getAssociationClass().getQualifiedName()%> association) throws TopiaException; - + public void add<%=Util.capitalize(attribute.getName())%>(<%=attribute.getAssociationClass().getQualifiedName()%> association) throws TopiaException; - + public void remove<%=Util.capitalize(attribute.getName())%>(<%=attribute.getAssociationClass().getQualifiedName()%> value) throws TopiaException; }*/ } } - + public void generateSetAssociationAttributeAccessor(Writer output, ObjectModelAttribute attribute) throws IOException { /*{ @@ -226,7 +226,11 @@ }*/ if(clazzifier instanceof ObjectModelClass){ - ObjectModelClass clazz = (ObjectModelClass)clazzifier; + ObjectModelClass clazz = (ObjectModelClass)clazzifier; +/*{ + public static final long schemaVersion = <%=Util.getSerialVersionUID(clazz)%>L; +}*/ + /*{ /** * Return the model class for this entity as an entry point in the project entities model