X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=Workspace%2FSiman-Common%2Fsrc%2Forg%2Fsplat%2Fdal%2Fbo%2Fsom%2FProjectElement.java;fp=Workspace%2FSiman-Common%2Fsrc%2Forg%2Fsplat%2Fdal%2Fbo%2Fsom%2FProjectElement.java;h=62d1e876af8c1c2a65594b35d5408de1abc2275f;hb=19da6bc3492c002aa5837a58a819e980dc36fccc;hp=bf08b16ff78e281bd56f71348b1935ef35289f69;hpb=1b40185e08db7ed4f2b33aad920f2431a97ceec6;p=tools%2Fsiman.git diff --git a/Workspace/Siman-Common/src/org/splat/dal/bo/som/ProjectElement.java b/Workspace/Siman-Common/src/org/splat/dal/bo/som/ProjectElement.java index bf08b16..62d1e87 100644 --- a/Workspace/Siman-Common/src/org/splat/dal/bo/som/ProjectElement.java +++ b/Workspace/Siman-Common/src/org/splat/dal/bo/som/ProjectElement.java @@ -22,15 +22,36 @@ import org.splat.kernel.MultiplyDefinedException; import org.splat.kernel.ObjectProperties; import org.splat.som.Step; +/** + * Persistent project element class. It can be study or scenario. + */ public abstract class ProjectElement extends Entity { // Persistent fields + /** + * Persistent field: project element title. + */ protected String title; + /** + * Persistent field: project element author/manager. + */ protected User manager; - protected Date credate; // Object creation date - protected Date lasdate; // Object Last modification date - private final List contex = new Vector(); // Structured by the Step transient class - private final Set docums = new LinkedHashSet(); // Structured by the Step transient class + /** + * Persistent field: object creation date. + */ + protected Date credate; + /** + * Persistent field: object last modification date. + */ + protected Date lasdate; + /** + * Persistent field: simulation contexts structured by the Step transient class. + */ + private final List contex = new Vector(); + /** + * Persistent field: documents publications structured by the Step transient class. + */ + private final Set docums = new LinkedHashSet(); /** * Transient array of steps (folders). @@ -181,18 +202,46 @@ public abstract class ProjectElement extends Entity { // Protected member functions // ============================================================================================================================== + /** + * Add a document publication to the project element. + * + * @param newdoc + * the publication to add + * @return true if added successfully, otherwise false + */ public boolean add(final Publication newdoc) { return docums.add(newdoc); } + /** + * Add a simulation context to the project element. + * + * @param newdoc + * the simulation context to add + * @return true if added successfully, otherwise false + */ public boolean add(final SimulationContext newdoc) { return contex.add(newdoc); } + /** + * Remove the document publication from the project element. + * + * @param oldoc + * the publication to remove + * @return true if removed successfully, otherwise false + */ public boolean remove(final Publication oldoc) { return docums.remove(oldoc); // The removed tag becoming orphan, it is supposed automatically deleted from the data store } + /** + * Remove the simulation context from the project element. + * + * @param oldoc + * the simulation context to remove + * @return true if removed successfully, otherwise false + */ public boolean remove(final SimulationContext oldoc) { return contex.remove(oldoc); }