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 classStatefulExample.GetSclassStatefulExample.ImportTimestampclassStatefulExample.SetS
-
Constructor Summary
Constructors Constructor Description StatefulExample()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeserializeFromJSON(net.sf.json.JSONObject json)This is invoked on deserialization for you with the JSON object you set.net.sf.json.JSONObjectserializeToJSON()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'sStateobject, 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:
serializeToJSONin 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:
deserializeFromJSONin interfaceQDLMetaModule- Parameters:
json-
-
-