Adding User Classes at Run Time
Your user applications can add user classes at run time. Although these user‑defined classes are visible in the JADE development environment, they are not considered as part of the JADE model, you cannot reference them in JADE methods, they are not extracted, reorganized, and so on.
You can only define runtime dynamic properties on user classes. You can create instances of a user class of any lifetime (that is, persistent, transient, and shared‑transient lifetimes).
The following table summarizes the classes and methods that enable you to maintain user classes.
Class | Method | Description |
---|---|---|
Creates a user collection class as a subclass of the specified superclass in the receiving schema | ||
|
|
Creates a user class as a subclass of the specified superclass in the receiving schema |
|
|
Deletes a user class from the specified superclass in the receiving schema |
|
|
Adds an external key definition to a user class at run time |
|
|
Adds a member key definition to a user class at run time |
|
|
Clears existing key definitions |
|
|
Indicates the end of a single or multiple key definition |
|
|
Sets or changes the element length for an array |
|
|
Sets or changes the membership of a user class at run time |
The following example shows a runtime dynamic property being added to a user class.
vars userClass1 : Class; cluster : JadeDynamicPropertyCluster; c1 : C1; begin beginTransaction; userClass1 := currentSchema.addUserSubclass(C1, "UserClass1", "MapFileName"); cluster := userClass1.addDynamicPropertyCluster("Cluster"); cluster.addDynamicProperty("dynamicInteger", Integer, 0, 0.Byte); commitTransaction; create c1 as userClass1 transient; c1.integer := 123; // static property c1.setPropertyValue("dynamicInteger", 456); // runtime dynamic property c1.inspectModal(); delete c1; end;