Salome HOME
Siman codebase is refactored. Spring beans are introduced in the context.
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / dal / bo / kernel / TextAttribute.java
diff --git a/Workspace/Siman-Common/src/org/splat/dal/bo/kernel/TextAttribute.java b/Workspace/Siman-Common/src/org/splat/dal/bo/kernel/TextAttribute.java
new file mode 100644 (file)
index 0000000..4e797eb
--- /dev/null
@@ -0,0 +1,50 @@
+package org.splat.dal.bo.kernel;
+
+import org.splat.dal.dao.kernel.Database;
+
+/**
+ * 
+ * @author    Daniel Brunier-Coulin
+ * @copyright OPEN CASCADE 2012
+ */
+
+
+public abstract class TextAttribute extends Attribute {
+
+    //private  Text mytext;
+       private String mytext;
+
+//  ==============================================================================================================================
+//  Constructors
+//  ==============================================================================================================================
+
+//  Database fetch constructor.
+    protected TextAttribute () {
+    }
+
+//  Initialization constructor
+    protected TextAttribute (Any from, String value) {
+//  ----------------------------------------------
+      super(from);
+      mytext = value;
+    }
+
+//  ==============================================================================================================================
+//  Public member functions
+//  ==============================================================================================================================
+
+    public String getValue () {
+//  -------------------------
+      return mytext;
+    }
+
+//  ==============================================================================================================================
+//  Protected services
+//  ==============================================================================================================================
+
+    protected void setValue (String value) {
+//  --------------------------------------
+      mytext = value;
+      if (this.isSaved()) Database.getSession().update(this);
+    }
+}
\ No newline at end of file