Index: topia/src/java/org/codelutin/topia/TopiaContext.java diff -u topia/src/java/org/codelutin/topia/TopiaContext.java:1.31 topia/src/java/org/codelutin/topia/TopiaContext.java:1.32 --- topia/src/java/org/codelutin/topia/TopiaContext.java:1.31 Fri Aug 6 17:48:52 2004 +++ topia/src/java/org/codelutin/topia/TopiaContext.java Wed Sep 15 15:26:22 2004 @@ -23,9 +23,9 @@ * * @author Benjamin Poussin * Copyright Code Lutin - * @version $Revision: 1.31 $ + * @version $Revision: 1.32 $ * - * Mise a jour: $Date: 2004/08/06 17:48:52 $ + * Mise a jour: $Date: 2004/09/15 15:26:22 $ * par : $Author: bpoussin $ */ @@ -96,14 +96,18 @@ public TopiaPersistenceService getPersistenceService(Class entityClass) throws TopiaException { String className = entityClass.getName() + "PersistenceService"; Class interfacez = Util.getClazz(className); - - className = entityClass.getName() + "PersistenceServiceImpl"; - Class clazz = Util.getClazz(className); - - Object result = contextHelper.getSingletonObject(clazz); - result = getHookHelper().addHookSupport(result, new Class[]{interfacez}); - listeners.addCategory(this, result); + Object result = getService(interfacez, true); return (TopiaPersistenceService)result; + +// +// +// className = entityClass.getName() + "PersistenceServiceImpl"; +// Class clazz = Util.getClazz(className); +// +// Object result = contextHelper.getSingletonObject(clazz); +// result = getHookHelper().addHookSupport(result, new Class[]{interfacez}); +// listeners.addCategory(this, result); +// return (TopiaPersistenceService)result; } /** @@ -156,6 +160,11 @@ } Object result = contextHelper.getSingletonObject(clazz); result = getHookHelper().addHookSupport(result, new Class[]{serviceInterfacez}); + + if(result instanceof TopiaPersistenceService){ + listeners.addCategory(this, result); + } + return (TopiaService)result; } Index: topia/src/java/org/codelutin/topia/TopiaQuery.java diff -u topia/src/java/org/codelutin/topia/TopiaQuery.java:1.5 topia/src/java/org/codelutin/topia/TopiaQuery.java:1.6 --- topia/src/java/org/codelutin/topia/TopiaQuery.java:1.5 Tue Aug 3 16:07:14 2004 +++ topia/src/java/org/codelutin/topia/TopiaQuery.java Wed Sep 15 15:26:22 2004 @@ -23,9 +23,9 @@ * * @author Benjamin Poussin * Copyright Code Lutin - * @version $Revision: 1.5 $ + * @version $Revision: 1.6 $ * - * Mise a jour: $Date: 2004/08/03 16:07:14 $ + * Mise a jour: $Date: 2004/09/15 15:26:22 $ * par : $Author: bpoussin $ */ @@ -35,6 +35,11 @@ import java.io.Serializable; import java.util.List; +/** +* @todo ajouter des methodes orderby(String field, boolean ascending) +* et prendre en compte que l'on peut en avoir plusieurs d'appele +* sur l'objet +*/ public class TopiaQuery implements Serializable { // TopiaQuery protected String select = null;