Index: topia2/src/java/org/codelutin/topia/persistence/TopiaDAO.java diff -u topia2/src/java/org/codelutin/topia/persistence/TopiaDAO.java:1.10 topia2/src/java/org/codelutin/topia/persistence/TopiaDAO.java:1.11 --- topia2/src/java/org/codelutin/topia/persistence/TopiaDAO.java:1.10 Mon Oct 23 15:01:58 2006 +++ topia2/src/java/org/codelutin/topia/persistence/TopiaDAO.java Tue Nov 14 14:10:32 2006 @@ -23,9 +23,9 @@ * Created: 30 déc. 2005 03:00:57 * * @author poussin - * @version $Revision: 1.10 $ + * @version $Revision: 1.11 $ * - * Last update: $Date: 2006/10/23 15:01:58 $ + * Last update: $Date: 2006/11/14 14:10:32 $ * by : $Author: ruchaud $ */ @@ -36,6 +36,10 @@ import java.util.Map; import org.codelutin.topia.TopiaException; +import org.codelutin.topia.event.TopiaEntityListener; +import org.codelutin.topia.event.TopiaEntityVetoable; +import org.codelutin.topia.event.TopiaTransactionListener; +import org.codelutin.topia.event.TopiaTransactionVetoable; import org.codelutin.topia.framework.TopiaContextImplementor; /** @@ -201,4 +205,12 @@ public abstract List findAllContainsProperties(String propertyName, Collection values, Object... others) throws TopiaException; + /* Adders */ + public void addTopiaEntityListener(TopiaEntityListener listener); + public void addTopiaEntityVetoable(TopiaEntityVetoable vetoable); + + /* Removers */ + public void removeTopiaEntityListener(TopiaEntityListener listener); + public void removeTopiaEntityVetoable(TopiaEntityVetoable vetoable); + } //TopiaDAO Index: topia2/src/java/org/codelutin/topia/persistence/TopiaDAODelegator.java diff -u topia2/src/java/org/codelutin/topia/persistence/TopiaDAODelegator.java:1.10 topia2/src/java/org/codelutin/topia/persistence/TopiaDAODelegator.java:1.11 --- topia2/src/java/org/codelutin/topia/persistence/TopiaDAODelegator.java:1.10 Mon Oct 23 15:01:58 2006 +++ topia2/src/java/org/codelutin/topia/persistence/TopiaDAODelegator.java Tue Nov 14 14:10:32 2006 @@ -23,9 +23,9 @@ * Created: 30 déc. 2005 22:28:48 * * @author poussin - * @version $Revision: 1.10 $ + * @version $Revision: 1.11 $ * - * Last update: $Date: 2006/10/23 15:01:58 $ + * Last update: $Date: 2006/11/14 14:10:32 $ * by : $Author: ruchaud $ */ @@ -36,6 +36,8 @@ import java.util.Map; import org.codelutin.topia.TopiaException; +import org.codelutin.topia.event.TopiaEntityListener; +import org.codelutin.topia.event.TopiaEntityVetoable; import org.codelutin.topia.framework.TopiaContextImplementor; @@ -226,5 +228,37 @@ public List findAllContainsProperties(String propertyName, Collection values, Object... others) throws TopiaException { return getParentDAO().findAllContainsProperties(propertyName, values, others); } + + /* + * (non-Javadoc) + * @see org.codelutin.topia.persistence.TopiaDAO#addTopiaEntityListener(org.codelutin.topia.event.TopiaEntityListener) + */ + public void addTopiaEntityListener(TopiaEntityListener listener) { + getParentDAO().addTopiaEntityListener(listener); + } + + /* + * (non-Javadoc) + * @see org.codelutin.topia.persistence.TopiaDAO#addTopiaEntityVetoable(org.codelutin.topia.event.TopiaEntityVetoable) + */ + public void addTopiaEntityVetoable(TopiaEntityVetoable vetoable) { + getParentDAO().addTopiaEntityVetoable(vetoable); + } + + /* + * (non-Javadoc) + * @see org.codelutin.topia.persistence.TopiaDAO#removeTopiaEntityListener(org.codelutin.topia.event.TopiaEntityListener) + */ + public void removeTopiaEntityListener(TopiaEntityListener listener) { + getParentDAO().removeTopiaEntityListener(listener); + } + + /* + * (non-Javadoc) + * @see org.codelutin.topia.persistence.TopiaDAO#removeTopiaEntityVetoable(org.codelutin.topia.event.TopiaEntityVetoable) + */ + public void removeTopiaEntityVetoable(TopiaEntityVetoable vetoable) { + getParentDAO().removeTopiaEntityVetoable(vetoable); + } } //TopiaDAODelegator Index: topia2/src/java/org/codelutin/topia/persistence/TopiaDAOAbstract.java diff -u topia2/src/java/org/codelutin/topia/persistence/TopiaDAOAbstract.java:1.15 topia2/src/java/org/codelutin/topia/persistence/TopiaDAOAbstract.java:1.16 --- topia2/src/java/org/codelutin/topia/persistence/TopiaDAOAbstract.java:1.15 Mon Oct 23 15:01:58 2006 +++ topia2/src/java/org/codelutin/topia/persistence/TopiaDAOAbstract.java Tue Nov 14 14:10:32 2006 @@ -23,9 +23,9 @@ * Created: 31 déc. 2005 13:10:34 * * @author poussin - * @version $Revision: 1.15 $ + * @version $Revision: 1.16 $ * - * Last update: $Date: 2006/10/23 15:01:58 $ + * Last update: $Date: 2006/11/14 14:10:32 $ * by : $Author: ruchaud $ */ @@ -45,6 +45,8 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.codelutin.topia.TopiaException; +import org.codelutin.topia.event.TopiaEntityListener; +import org.codelutin.topia.event.TopiaEntityVetoable; import org.codelutin.topia.framework.TopiaContextImplementor; import org.codelutin.topia.persistence.hibernate.TopiaDAOHibernate; import org.hibernate.HibernateException; @@ -683,4 +685,21 @@ return Restrictions.or(crit1, crit2); } + public void addTopiaEntityListener(TopiaEntityListener listener) { + getContext().addTopiaEntityListener((Class) entityClass, listener); + } + + public void addTopiaEntityVetoable(TopiaEntityVetoable vetoable) { + getContext().addTopiaEntityVetoable((Class) entityClass, vetoable); + } + + public void removeTopiaEntityListener(TopiaEntityListener listener) { + getContext().removeTopiaEntityListener((Class) entityClass, listener); + } + + public void removeTopiaEntityVetoable(TopiaEntityVetoable vetoable) { + getContext().removeTopiaEntityVetoable((Class) entityClass, vetoable); + } + + } //TopiaDAOAbstract