Salome HOME
The draft of the "Copy from existing study" action is added. The YACS step is introdu...
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / dal / bo / som / Study.java
index 60af1dfba3e1a6961c702ba606c446229def446a..fd304905db36ea0d19d096e2116b8f634003085d 100644 (file)
@@ -476,4 +476,23 @@ public class Study extends ProjectElement {
                this.markreference = markreference;
        }
        
+       /** 
+        * {@inheritDoc}
+        * @see org.splat.dal.bo.som.ProjectElement#evict()
+        */
+       @Override
+       public void evict() {
+               super.evict();
+               // Evict all attributes of the persistent object
+               Set<Scenario> tmpSet = new HashSet<Scenario>();
+               tmpSet.addAll(scenarii);
+               scenarii.clear();
+               // Evict publications
+               for (Scenario rel : tmpSet) {
+                       if (rel.isSaved()) { // to avoid recursive evict
+                               rel.evict();
+                       }
+                       scenarii.add(rel);
+               }
+       }
 }
\ No newline at end of file