]> SALOME platform Git repositories - tools/siman.git/blobdiff - Workspace/Siman-Common/src/org/splat/dal/bo/som/SimulationContextType.java
Salome HOME
Refactoring continues: UserService is created instead of UserDirectory. Database...
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / dal / bo / som / SimulationContextType.java
index c275cb87988b462e6cd41b36e4cdd0226340e911..607582aba8d21ff42ed0a060036ccec8dceac942 100644 (file)
@@ -8,11 +8,8 @@ package org.splat.dal.bo.som;
 import java.io.Serializable;
 
 import org.splat.dal.bo.kernel.Persistent;
-import org.splat.dal.dao.som.Database;
 import org.splat.kernel.InvalidPropertyException;
 import org.splat.service.technical.ProjectSettingsService;
-import org.splat.service.technical.ProjectSettingsService.Step;
-import org.splat.service.technical.ProjectSettingsServiceImpl;
 
 
 public class SimulationContextType extends Persistent implements Serializable {
@@ -20,7 +17,7 @@ public class SimulationContextType extends Persistent implements Serializable {
 //  Persistent fields
     private String         name;
     private ProgressState  state;
-    private int            step;
+       private int            step;
 
 //  Required by the serialization
        private static final long serialVersionUID = 4819425038576161242L;
@@ -41,7 +38,7 @@ public class SimulationContextType extends Persistent implements Serializable {
       public ProjectSettingsService.Step getStep () {
        return step;
       }
-      public Properties setState (ProgressState state) {
+      public Properties setProgressState (ProgressState state) {
        this.state = state;
        return this;
       }
@@ -66,14 +63,6 @@ public class SimulationContextType 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(Object entity) {
 //  ------------------------------------
       if (entity == null) return false;
@@ -91,11 +80,6 @@ public class SimulationContextType extends Persistent implements Serializable {
       }
     }
 
-    public ProjectSettingsService.Step getAttachedStep () {
-//  ----------------------------------------------
-      return ProjectSettingsServiceImpl.getStep(step);
-    }
-
     public String getName () {
 //  ------------------------
       return name;
@@ -111,4 +95,33 @@ public class SimulationContextType extends Persistent implements Serializable {
 //  ----------------------------
       return (state == ProgressState.APPROVED);
     }
+    /**
+        * Get the state.
+        * @return the state
+        */
+       public ProgressState getState() {
+               return state;
+       }
+       /**
+        * Set the state.
+        * @param state the state to set
+        */
+       public void setState(ProgressState state) {
+               this.state = state;
+       }
+       /**
+        * Get the step.
+        * @return the step
+        */
+       public int getStep() {
+               return step;
+       }
+       /**
+        * Set the step.
+        * @param step the step to set
+        */
+       public void setStep(int step) {
+               this.step = step;
+       }
+
 }
\ No newline at end of file