Salome HOME
Refactoring continues: UserService is created instead of UserDirectory. Database...
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / dal / bo / som / SimulationContext.java
index 828033b883a0dcf893b8dcdbeafc43719a74900f..ab900bd0660bf2b122c4f95e7fc4d5bdeb682fc6 100644 (file)
@@ -6,12 +6,8 @@ package org.splat.dal.bo.som;
  */
 
 import java.io.Serializable;
-import java.util.List;
-
-import org.hibernate.Session;
 
 import org.splat.dal.bo.kernel.Persistent;
-import org.splat.dal.dao.som.Database;
 import org.splat.kernel.InvalidPropertyException;
 import org.splat.kernel.MissedPropertyException;
 import org.splat.kernel.MultiplyDefinedException;
@@ -24,7 +20,7 @@ public class SimulationContext extends Persistent implements Serializable {
        private SimulationContextType  type;     // User extendable types
     private int                    step;
     private ProgressState          state;
-    private String                 value;
+       private String                 value;
     private int                    counter;
 
     private static final long serialVersionUID = 422889133378471949L;
@@ -114,14 +110,6 @@ public class SimulationContext extends Persistent implements Serializable {
 //  Public member functions
 //  ==============================================================================================================================
 
-    public boolean approve () {
-//  -------------------------
-      if  (state != ProgressState.inCHECK) return false;      
-      this.state =  ProgressState.APPROVED;     // The type name is supposed being localized
-      Database.getSession().update(this);
-         return true;
-    }
-
     public boolean equals (SimulationContext given) {
 //  -----------------------------------------------
       if (isSaved()) return (this.getIndex() == given.getIndex());
@@ -140,6 +128,14 @@ public class SimulationContext extends Persistent implements Serializable {
       return state;
     }
 
+    /**
+        * Set the state.
+        * @param state the state to set
+        */
+       public void setProgressState(ProgressState state) {
+               this.state = state;
+       }
+       
     public SimulationContextType getType () {
 //  ---------------------------------------
       return type;