Skip to main content

%Net.Serializer

Class %Net.Serializer [ Abstract, System = 3 ]

This is a utility class that provides an API for serializing objects to a wire protocol for interchange with remote systems.

Methods

%Serialize

Method %Serialize(ByRef ref) As %Status [ CodeMode = objectgenerator, Internal ]

This method performs automatic validation of an object's attribute values. It is called by %Save before persistent objects are stored to the database.

%ValidateObject does the following:

  1. It tests if any required property values are missing.
  2. If specified (if the PROPERTYVALIDATION class parameter is set to ValidateOnSave), it tests property validation.
  3. If present, it will call a user-supplied %OnValidateObject method.

If any of these tests fail, %ValidateObject immediately returns an error value. %Save (if it is the caller of %ValidateObject) will stop its operation, rollback any transactions it has started, and also return.

Returns a %Status value indicating success or failure. Serialize this object instance to a special wire format.

%Deserialize

Method %Deserialize(ByRef tref, current As %Integer) As %Status [ CodeMode = objectgenerator, GenerateAfter = %Serialize, Internal ]

Deserialize wire data back into an object instance.