*/
import org.splat.dal.bo.kernel.Persistent;
-import org.splat.dal.dao.som.Database;
public class KnowledgeElementType extends Persistent {
// Constructors
// ==============================================================================================================================
-// Database fetch constructor
+ // Database fetch constructor
protected KnowledgeElementType () {
}
// Initialization constructor
// 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;
// ----------------------------
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