Index: topia/src/java/org/codelutin/topia/AbstractTopiaEntity.java diff -u topia/src/java/org/codelutin/topia/AbstractTopiaEntity.java:1.5 topia/src/java/org/codelutin/topia/AbstractTopiaEntity.java:1.6 --- topia/src/java/org/codelutin/topia/AbstractTopiaEntity.java:1.5 Fri Jun 10 08:21:57 2005 +++ topia/src/java/org/codelutin/topia/AbstractTopiaEntity.java Fri Jun 10 09:43:01 2005 @@ -23,9 +23,9 @@ * * @author Benjamin Poussin * Copyright Code Lutin - * @version $Revision: 1.5 $ + * @version $Revision: 1.6 $ * - * Mise a jour: $Date: 2005/06/10 08:21:57 $ + * Mise a jour: $Date: 2005/06/10 09:43:01 $ * par : $Author: thimel $ */ @@ -33,6 +33,8 @@ import java.util.Collection; import java.util.Date; +import java.util.Iterator; + import org.codelutin.util.VersionNumberUtil; public abstract class AbstractTopiaEntity extends AbstractTopiaElement implements TopiaEntity { // AbstractTopiaEntity @@ -54,7 +56,6 @@ set_topiaCreationDate_(date); set_topiaLastUpdateDate_(date); set_topiaVersion_("0"); - set_dependentEntities_(new java.util.ArrayList()); } /** @@ -123,11 +124,31 @@ this._topiaLastUpdateUser_ = lastUpdateUser; } - public Collection get_dependentEntities_() throws TopiaException { +/* public Collection get_dependentEntities_() throws TopiaException { return _dependentEntities; } public void set_dependentEntities_(Collection dependentEntities) throws TopiaException { this._dependentEntities = dependentEntities; } +*/ + public boolean add_dependentEntities_(TopiaEntity entity) throws TopiaException { + if (this._dependentEntities == null) + this._dependentEntities = new java.util.ArrayList(); + return this._dependentEntities.add(entity); + } + + public void remove_dependentEntities_(TopiaEntity entity) throws TopiaException { + if (this._dependentEntities == null) + this._dependentEntities = new java.util.ArrayList(); + else + this._dependentEntities.remove(entity); + } + + public Iterator iterator_dependentEntities_() throws TopiaException { + if (this._dependentEntities == null) + this._dependentEntities = new java.util.ArrayList(); + return _dependentEntities.iterator(); + } + } // AbstractTopiaEntity Index: topia/src/java/org/codelutin/topia/TopiaEntity.java diff -u topia/src/java/org/codelutin/topia/TopiaEntity.java:1.16 topia/src/java/org/codelutin/topia/TopiaEntity.java:1.17 --- topia/src/java/org/codelutin/topia/TopiaEntity.java:1.16 Fri Jun 10 08:21:57 2005 +++ topia/src/java/org/codelutin/topia/TopiaEntity.java Fri Jun 10 09:43:01 2005 @@ -23,15 +23,16 @@ * * @author Cédric Pineau * Copyright Code Lutin -* @version $Revision: 1.16 $ +* @version $Revision: 1.17 $ * -* Last update : $Date: 2005/06/10 08:21:57 $ +* Last update : $Date: 2005/06/10 09:43:01 $ * by : $Author: thimel $ */ package org.codelutin.topia; import java.io.Serializable; import java.util.Date; +import java.util.Iterator; /** * Top Level common interface to all topia entityes. @@ -53,5 +54,9 @@ public void set_topiaLastUpdateUser_(TopiaUser v) throws TopiaException; public void remove() throws TopiaException; + + public boolean add_dependentEntities_(TopiaEntity entity) throws TopiaException; + public void remove_dependentEntities_(TopiaEntity entity) throws TopiaException; + public Iterator iterator_dependentEntities_() throws TopiaException; } // TopiaEntity