Class StatefulExample
- java.lang.Object
-
- org.qdl_lang.extensions.examples.stateful.StatefulExample
-
- All Implemented Interfaces:
Serializable
,QDLMetaModule
public class StatefulExample extends Object implements QDLMetaModule
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
StatefulExample.GetS
class
StatefulExample.ImportTimestamp
class
StatefulExample.SetS
-
Constructor Summary
Constructors Constructor Description StatefulExample()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deserializeFromJSON(net.sf.json.JSONObject json)
This is invoked on deserialization for you with the JSON object you set.net.sf.json.JSONObject
serializeToJSON()
This serializes the state of the Java module only.
-
-
-
Field Detail
-
s
protected String s
-
-
Method Detail
-
serializeToJSON
public net.sf.json.JSONObject serializeToJSON()
This serializes the state of the Java module only. There is a QDl variable that is created, but that is stored in QDL'sState
object, so you don't need to do anything with it. There is no requirement on the structure of the JSON object. You are free to structure it however you want.- Specified by:
serializeToJSON
in interfaceQDLMetaModule
- Returns:
-
deserializeFromJSON
public void deserializeFromJSON(net.sf.json.JSONObject json)
This is invoked on deserialization for you with the JSON object you set. You may also do any other re-initialization tasks that are required to make your class functional. The contract states that when this method exits, the class's state should be fully restored.- Specified by:
deserializeFromJSON
in interfaceQDLMetaModule
- Parameters:
json
-
-
-