Salome HOME
Refactoring continues: UserService is created instead of UserDirectory. Database...
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / dal / bo / kernel / Any.java
index 1992ed5a9a7b46a6d424c1075bd8e8d8e998c686..b047d8fa0c52aa7da6ca0476f50f7406dd3a6d32 100644 (file)
@@ -13,8 +13,6 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Set;
 
-import org.hibernate.Session;
-import org.splat.dal.dao.som.Database;
 import org.splat.kernel.InvalidPropertyException;
 import org.splat.kernel.MissedPropertyException;
 import org.splat.kernel.MultiplyDefinedException;
@@ -69,7 +67,7 @@ public abstract class Any extends Persistent {
       for (Iterator<Attribute> i=attributes.iterator(); i.hasNext(); ) {
         if (!i.next().equals(field)) continue;
        i.remove();
-        if (this.isSaved()) Database.getSession().update(this);
+       //RKV        if (this.isSaved()) Database.getCurSession().update(this);
        return true;
       }
       return false;
@@ -78,7 +76,7 @@ public abstract class Any extends Persistent {
     public boolean setAttribute (Attribute field) {
 //  ------------------------------------------------
       Class<?> type    = field.getClass();
-      Session  session = Database.getSession();
+//RKV      Session  session = Database.getCurSession();
 
       if (!field.getFrom().equals(this)) return false;
       for (Iterator<Attribute> i=attributes.iterator(); i.hasNext(); ) {
@@ -88,8 +86,8 @@ public abstract class Any extends Persistent {
       }
       attributes.add(field);
       if (this.isSaved()) {
-        if (!field.isSaved()) session.save(field);
-        session.update(this);
+       //RKV        if (!field.isSaved()) session.save(field);
+       //RKV           session.update(this);
       }     // Else, when saving this, Hibernate will propagate the operation
       return true;
     }