Index: topia2/src/java/org/codelutin/topia/persistence/TopiaDAO.java diff -u topia2/src/java/org/codelutin/topia/persistence/TopiaDAO.java:1.11 topia2/src/java/org/codelutin/topia/persistence/TopiaDAO.java:1.12 --- topia2/src/java/org/codelutin/topia/persistence/TopiaDAO.java:1.11 Tue Nov 14 14:10:32 2006 +++ topia2/src/java/org/codelutin/topia/persistence/TopiaDAO.java Tue Nov 14 22:37:02 2006 @@ -23,10 +23,10 @@ * Created: 30 déc. 2005 03:00:57 * * @author poussin - * @version $Revision: 1.11 $ + * @version $Revision: 1.12 $ * - * Last update: $Date: 2006/11/14 14:10:32 $ - * by : $Author: ruchaud $ + * Last update: $Date: 2006/11/14 22:37:02 $ + * by : $Author: bpoussin $ */ package org.codelutin.topia.persistence; @@ -58,6 +58,12 @@ public void init(TopiaContextImplementor context, Class entityClass) throws TopiaException; /** + * Return class of entity managed by this DAO + * @return + */ + public abstract Class getEntityClass(); + + /** * @return Returns the context. */ public abstract TopiaContextImplementor getContext(); Index: topia2/src/java/org/codelutin/topia/persistence/TopiaDAOAbstract.java diff -u topia2/src/java/org/codelutin/topia/persistence/TopiaDAOAbstract.java:1.16 topia2/src/java/org/codelutin/topia/persistence/TopiaDAOAbstract.java:1.17 --- topia2/src/java/org/codelutin/topia/persistence/TopiaDAOAbstract.java:1.16 Tue Nov 14 14:10:32 2006 +++ topia2/src/java/org/codelutin/topia/persistence/TopiaDAOAbstract.java Tue Nov 14 22:37:02 2006 @@ -23,10 +23,10 @@ * Created: 31 déc. 2005 13:10:34 * * @author poussin - * @version $Revision: 1.16 $ + * @version $Revision: 1.17 $ * - * Last update: $Date: 2006/11/14 14:10:32 $ - * by : $Author: ruchaud $ + * Last update: $Date: 2006/11/14 22:37:02 $ + * by : $Author: bpoussin $ */ package org.codelutin.topia.persistence; @@ -79,6 +79,10 @@ protected TopiaContextImplementor context = null; + public Class getEntityClass() { + throw new UnsupportedOperationException("This method must be overided in generated DAO"); + } + /** * Retourne l'id de l'entity * @param e l'entity Index: topia2/src/java/org/codelutin/topia/persistence/TopiaDAODelegator.java diff -u topia2/src/java/org/codelutin/topia/persistence/TopiaDAODelegator.java:1.11 topia2/src/java/org/codelutin/topia/persistence/TopiaDAODelegator.java:1.12 --- topia2/src/java/org/codelutin/topia/persistence/TopiaDAODelegator.java:1.11 Tue Nov 14 14:10:32 2006 +++ topia2/src/java/org/codelutin/topia/persistence/TopiaDAODelegator.java Tue Nov 14 22:37:02 2006 @@ -23,10 +23,10 @@ * Created: 30 déc. 2005 22:28:48 * * @author poussin - * @version $Revision: 1.11 $ + * @version $Revision: 1.12 $ * - * Last update: $Date: 2006/11/14 14:10:32 $ - * by : $Author: ruchaud $ + * Last update: $Date: 2006/11/14 22:37:02 $ + * by : $Author: bpoussin $ */ package org.codelutin.topia.persistence; @@ -82,6 +82,13 @@ } /* (non-Javadoc) + * @see org.codelutin.topia.persistence.TopiaDAO#getEntityClass() + */ + public Class getEntityClass() { + return getParentDAO().getEntityClass(); + } + + /* (non-Javadoc) * @see org.codelutin.topia.TopiaDAO#getContext() */ public TopiaContextImplementor getContext() {