Index: topia2/src/java/org/codelutin/topia/generator/ServiceAbstractGenerator.java diff -u topia2/src/java/org/codelutin/topia/generator/ServiceAbstractGenerator.java:1.3 topia2/src/java/org/codelutin/topia/generator/ServiceAbstractGenerator.java:1.4 --- topia2/src/java/org/codelutin/topia/generator/ServiceAbstractGenerator.java:1.3 Wed Jun 27 09:53:22 2007 +++ topia2/src/java/org/codelutin/topia/generator/ServiceAbstractGenerator.java Thu Jul 5 09:51:19 2007 @@ -46,7 +46,7 @@ * Created: 19 juin 2007 * * @author dupont -* @version $Revision: 1.3 $ +* @version $Revision: 1.4 $ * * Le service abstrait etend TopiaApplicationServiceAbstract et implement * l'interface du service. @@ -56,7 +56,7 @@ * @see ServiceInterfaceGenerator * @see TopiaApplicationServiceAbstract * -* Mise a jour: $Date: 2007/06/27 09:53:22 $ +* Mise a jour: $Date: 2007/07/05 09:51:19 $ * par : $Author: ndupont $ */ public class ServiceAbstractGenerator extends ObjectModelGenerator { @@ -187,7 +187,7 @@ return; } /*{ - /** + /** * Supprime l'entite <%=clazz.getName()%> passee en parametre * @param entity l'entite a supprimer *) @@ -196,6 +196,17 @@ <%=clazz.getName()%>DAOAbstract dao = (<%=clazz.getName()%>DAOAbstract)usedContextImpl.getDAO(<%=clazz.getName()%>.class); dao.delete(entity); } + + /** + * Retourne tous les <%=clazz.getName()%> + * @return une liste + *) + public List<<%=clazz.getQualifiedName()%>> findAll<%=clazz.getName()%>() throws TopiaException { + TopiaContextImplementor usedContextImpl = (TopiaContextImplementor) topiaContext; + <%=clazz.getName()%>DAOAbstract dao = (<%=clazz.getName()%>DAOAbstract)usedContextImpl.getDAO(<%=clazz.getName()%>.class); + List<<%=clazz.getName()%>> result = dao.findAll(); + return result; + } }*/ for (Iterator it = clazz.getAttributes().iterator(); it.hasNext();) { ObjectModelAttribute attr = (ObjectModelAttribute)it.next();