Index: topia/src/java/org/codelutin/topia/generators/ObjectModelToEntityGenerator.java diff -u topia/src/java/org/codelutin/topia/generators/ObjectModelToEntityGenerator.java:1.17 topia/src/java/org/codelutin/topia/generators/ObjectModelToEntityGenerator.java:1.18 --- topia/src/java/org/codelutin/topia/generators/ObjectModelToEntityGenerator.java:1.17 Wed Aug 24 17:10:52 2005 +++ topia/src/java/org/codelutin/topia/generators/ObjectModelToEntityGenerator.java Tue Aug 30 13:19:52 2005 @@ -23,10 +23,10 @@ * * @author Benjamin Poussin * Copyright Code Lutin - * @version $Revision: 1.17 $ + * @version $Revision: 1.18 $ * - * Mise a jour: $Date: 2005/08/24 17:10:52 $ - * par : $Author: thimel $ + * Mise a jour: $Date: 2005/08/30 13:19:52 $ + * par : $Author: bpoussin $ */ package org.codelutin.topia.generators; @@ -136,6 +136,9 @@ }*/ generateClassInfo(output, clazz); /*{public interface <%=clazz.getName()%> extends TopiaEntity}*/ + if(clazz instanceof ObjectModelAssociationClass){ + /*{, TopiaAssociationEntity}*/ + } for (Iterator i = clazz.getInterfaces().iterator(); i.hasNext();) { ObjectModelInterface interfacezz = (ObjectModelInterface) i.next(); /*{, }*/ @@ -203,6 +206,9 @@ throws IOException { /*{ <%=generateMethodInfo(MethodType.FIELD_ACCESSOR, false, attribute, false)%> + public TopiaEntity get_attribute_<%=((Util.isFirstAttribute(attribute)) ? "A" : "B") %>_() throws TopiaException; + + <%=generateMethodInfo(MethodType.FIELD_ACCESSOR, false, attribute, false)%> public <%=attribute.getType()%> get<%=Util.capitalize(attribute.getName())%>() throws TopiaException; }*/ } @@ -276,6 +282,9 @@ throws IOException { /*{ <%=generateMethodInfo(MethodType.FIELD_ACCESSOR, true, attribute, false)%> + public void set_attribute_<%=((Util.isFirstAttribute(attribute)) ? "A" : "B") %>_(TopiaEntity value) throws TopiaException; + + <%=generateMethodInfo(MethodType.FIELD_ACCESSOR, true, attribute, false)%> public void set<%=Util.capitalize(attribute.getName())%>(<%=attribute.getType()%> value) throws TopiaException; }*/ } @@ -294,7 +303,7 @@ } public void generateOperationBody(Writer output, ObjectModelOperation operation) throws IOException { - String args = Util.getMethodParameterListName(operation.getParameters()); +// String args = Util.getMethodParameterListName(operation.getParameters()); /*{; }*/ } @@ -304,30 +313,6 @@ ////////////////////////////////////////////////////////////////////// public void generateOther(Writer output, ObjectModelClassifier clazzifier) throws IOException { -/*{ - - /** - * Return an XML representation of this entity - *) - <%=generateMethodInfo(MethodType.GENERATED, false, null, false)%> - public String toXML(); - -}*/ - if(clazzifier instanceof ObjectModelClass){ - 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 - *) - <%=generateMethodInfo(MethodType.GENERATED, false, null, false)%> - public ObjectModelClass getModelElement(); - -}*/ - } } ////////////////////////////////////////////////////////////////////// @@ -335,12 +320,6 @@ ////////////////////////////////////////////////////////////////////// public void generateRemoveEntity(Writer output, ObjectModelClassifier clazz) throws IOException { -/*{ - /** - * Delete this entity with its persistenceService - *) }*/ /* Déplacée dans TopiaEntity */ /*{ - //public void remove() throws TopiaException; -}*/ } } // ObjectModelToEntityGenerator Index: topia/src/java/org/codelutin/topia/generators/TopiaAbstractObjectModelGenerator.java diff -u topia/src/java/org/codelutin/topia/generators/TopiaAbstractObjectModelGenerator.java:1.13 topia/src/java/org/codelutin/topia/generators/TopiaAbstractObjectModelGenerator.java:1.14 --- topia/src/java/org/codelutin/topia/generators/TopiaAbstractObjectModelGenerator.java:1.13 Wed Jul 27 16:35:52 2005 +++ topia/src/java/org/codelutin/topia/generators/TopiaAbstractObjectModelGenerator.java Tue Aug 30 13:19:52 2005 @@ -23,10 +23,10 @@ * * @author Benjamin Poussin * Copyright Code Lutin - * @version $Revision: 1.13 $ + * @version $Revision: 1.14 $ * - * Mise a jour: $Date: 2005/07/27 16:35:52 $ - * par : $Author: thimel $ + * Mise a jour: $Date: 2005/08/30 13:19:52 $ + * par : $Author: bpoussin $ */ package org.codelutin.topia.generators; @@ -84,9 +84,9 @@ for (Iterator i = assoc.getParticipantsAttributes().iterator(); i.hasNext(); ) { ObjectModelAttribute attribute = (ObjectModelAttribute) i.next(); if (attribute != null) { - generateAssociationAttributeDeclaration(output, attribute); - generateGetAssociationAttributeAccessor(output, attribute); - generateSetAssociationAttributeAccessor(output, attribute); + generateAssociationAttributeDeclaration(output, attribute); + generateGetAssociationAttributeAccessor(output, attribute); + generateSetAssociationAttributeAccessor(output, attribute); } } } @@ -182,6 +182,7 @@ /*{ import <%=getProperty("defaultPackage")%>.<%=model.getName()%>Context; import org.codelutin.topia.TopiaContext; +import org.codelutin.topia.TopiaAssociationEntity; import org.codelutin.topia.TopiaEntity; import org.codelutin.topia.TopiaEntityOperation; import org.codelutin.topia.AbstractTopiaEntity;