Salome HOME
Refactoring continues: UserService is created instead of UserDirectory. Database...
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / dal / bo / som / KnowledgeElementType.java
index 41cad5a429d9ceb74f2c359452189af6b9e0869f..720944890976b9473c393667e46a98fddaa8fd32 100644 (file)
@@ -6,7 +6,6 @@ package org.splat.dal.bo.som;
  */
 
 import org.splat.dal.bo.kernel.Persistent;
-import org.splat.dal.dao.som.Database;
 
 
 public class KnowledgeElementType extends Persistent {
@@ -18,7 +17,7 @@ public class KnowledgeElementType extends Persistent {
 //  Constructors
 //  ==============================================================================================================================
 
-//  Database fetch constructor
+       //  Database fetch constructor
     protected KnowledgeElementType () {
     }
 //  Initialization constructor
@@ -33,14 +32,6 @@ public class KnowledgeElementType extends Persistent {
 //  Public member functions
 //  ==============================================================================================================================
 
-    public boolean approve () {
-//  -------------------------
-      if  (state != ProgressState.inCHECK) return false;      
-      this.state =  ProgressState.APPROVED;     // The type name is supposed being localized
-      if (this.isSaved()) Database.getSession().update(this);
-         return true;
-    }
-
     public boolean equals(Object entity) {
 //  ------------------------------------
       if (entity == null) return false;
@@ -72,20 +63,18 @@ public class KnowledgeElementType extends Persistent {
 //  ----------------------------
       return (state == ProgressState.inWORK);
     }
-
-//  ==============================================================================================================================
-//  Protected service
-//  ==============================================================================================================================
-/**
- * Reserves this type for the management of simulation contexts.
- * For being able to get the studies in which simulation contexts are used, all study scenarios are indexed through this
- * knowledge element type, whether they include knowledge elements or not.
- */
-    public boolean reserve () {
-//  ----------------------------
-      if  (state != ProgressState.inCHECK) return false;      
-      this.state =  ProgressState.inWORK;
-      if (this.isSaved()) Database.getSession().update(this);
-      return true;
-    }
+    /**
+        * 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;
+       }
 }
\ No newline at end of file