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
1 package org.splat.dal.bo.kernel;
2
3 import org.splat.dal.dao.kernel.Database;
4
5 /**
6  * 
7  * @author    Daniel Brunier-Coulin
8  * @copyright OPEN CASCADE 2012
9  */
10
11
12 public abstract class TextAttribute extends Attribute {
13
14     //private  Text mytext;
15         private String mytext;
16
17 //  ==============================================================================================================================
18 //  Constructors
19 //  ==============================================================================================================================
20
21 //  Database fetch constructor.
22     protected TextAttribute () {
23     }
24
25 //  Initialization constructor
26     protected TextAttribute (Any from, String value) {
27 //  ----------------------------------------------
28       super(from);
29       mytext = value;
30     }
31
32 //  ==============================================================================================================================
33 //  Public member functions
34 //  ==============================================================================================================================
35
36     public String getValue () {
37 //  -------------------------
38       return mytext;
39     }
40
41 //  ==============================================================================================================================
42 //  Protected services
43 //  ==============================================================================================================================
44
45     protected void setValue (String value) {
46 //  --------------------------------------
47       mytext = value;
48       if (this.isSaved()) Database.getSession().update(this);
49     }
50 }