Class Reference
%Library.SerialObject
Server:basexml
Instance:SOAXML
User:UnknownUser
 
-
  [BASEXML] >  [%Library] >  [SerialObject]
Private  Storage

abstract serial class %Library.SerialObject extends %SwizzleObject

The %SerialObject class builds upon the functionality provided by the %RegisteredObject class and gives an object the ability to serialize itself and be embedded within another object.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
3 11


Summary

Methods
%%OIDGet %AddToSaveSet %AddToSyncSet %ClassIsLatestVersion
%ClassName %ConstructClone %Delete %DeleteId
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %GetSwizzleObject %IsA %IsModified
%New %NormalizeObject %ObjectModified %OnBeforeAddToSync
%OnDetermineClass %Open %OpenId %OriginalNamespace
%PackageName %RemoveFromSaveSet %ResolveConcurrencyConflict %SerializeObject
%SetModified %SyncObjectIn %SyncTransport %ValidateObject
LogicalToOdbc OdbcToLogical

Subclasses
%BI.AttachedPicture %BI.BPMKPI %BI.BitMapType
%BI.BoardObject %BI.CustomFunction %BI.DatFilter
%BI.DataCapFilter %BI.DetailListFields %BI.FORMOBJECT
%BI.FolderAccess %BI.FormField %BI.KPIList
%BI.MapKPI %BI.PerfMetMsg %BI.PopUpCon
%BI.RangeDisplay %BI.SMSession %BI.SchedulerTask
%BI.TemplateObject %BI.TransBitMap %BI.VennQry
%BI.WPivRow %BI.WorkFlowObj %CSP.Mgr.Helper.AlternativeServer
%CSP.Mgr.Helper.ApplicationPath %CSP.Mgr.Helper.CacheServer %CSP.Mgr.Helper.CachedForms
%CSP.Mgr.Helper.Connection %CSP.Mgr.Helper.Form %CSP.Util.Action
%CSP.Util.Condition %CSP.Util.FormButton %CSP.Util.Link
%CSP.Util.Menu %CSP.Util.MenuItem %Compiler.LG.ClientMakeDef
%Compiler.LG.ClientMakeDefElem %Compiler.LG.GenFlags %Compiler.LG.JavaClassDef
%Compiler.LG.JavaClassDefPointer %Compiler.LG.JavaColumnDef %Compiler.LG.JavaConstraintDef
%Compiler.LG.JavaElemDef %Compiler.LG.JavaForeignKeyDef %Compiler.LG.JavaIndexDef
%Compiler.LG.JavaTableDef %Compiler.LG.MetaClassDef %Compiler.LG.MetaElemDef
%Compiler.LG.MetaMethodDef %Compiler.LG.MetaMtdArgDef %Compiler.LG.MetaPropDef
%Compiler.LG.MetaQueryDef %DeepSee.Dashboard.CalculatedMember %DeepSee.Dashboard.ChartDataSeries
%DeepSee.Dashboard.Control %DeepSee.Dashboard.DataProperty %DeepSee.Dashboard.PivotCondition
%DeepSee.Dashboard.PivotLevel %DeepSee.Dashboard.Widget %DeepSee.UserLibrary.WorksheetAxis
%DeepSee.UserLibrary.WorksheetCell %DeepSee.extensions.iKnow.conf.Classifier %DeepSee.extensions.iKnow.conf.Config
%DeepSee.extensions.iKnow.conf.Data %DeepSee.extensions.iKnow.conf.Model %Library.ArrayOfDataTypes
%Library.ArrayOfObjects %Library.IStruct %Library.ListOfDataTypes
%Library.ListOfObjects %Library.RelationshipObject %Net.MIMESerialPart
%Net.MailMessagePart %ResultSet.MD.Column %ResultSet.MD.ObjectId
%ResultSet.MD.Parameter %SOAP.Security.Created %SOAP.Security.Password
%SQL.StatementColumn %SQL.StatementObject %SQL.StatementParameter
%Studio.Extension.MenuItem %WebStress.Control.AppServers %WebStress.Control.GeneratorStatus
%WebStress.Control.Processes %WebStress.Control.Progress %WebStress.Control.ValidData.Request.Parameters
%WebStress.Control.ValidData.Response %WebStress.Control.ValidData.Response.Generators %WebStress.Control.ValidData.Response.Generators.Data
%WebStress.Playback.Session %XML.Security.Algorithm

Parameters

• parameter ODBCDELIMITER = ",";
A serial object is converted to a delimited string containing the object's property values when it is projected via ODBC. ODBCDELIMITER is the delimiter character used to construct the delimited string.
• parameter PROPERTYVALIDATION = 2;
This parameter controls the default validation behavior for the object.

It can take one of the following values:
0: NoValidate Perform no automatic property validation.
1: ValidateOnSet Perform validation (call the property's ..IsValid() method) every time an attribute value is set.
2: ValidateOnSave Perform property validation (in the %ValidateObject() method)) when the object is saved. This is only applicable to persistent objects.

• parameter SERIALDELIMITER;
This parameter specifies the delimiter character used when created a serialized version of the object. If the parameter is set to null string ("") then a length delimited ($List) string is used which can be manipulated using the $List functions.

Methods

• final classmethod %Delete(oid As %ObjectIdentity = "", concurrency As %Integer = -1) as %Status
Deletes streams referenced by this object and calls %Delete on any embedded objects Refer to About Concurrency for more details on the optional concurrency argument.

Returns a %Status value indicating success or failure.

• final classmethod %DeleteId(id As %String, concurrency As %Integer = -1) as %Status
Deletes the stored version of the object with ID id from the database.

%DeleteId is identical in operation to the %Delete method except that it uses and Id value instead of an OID value to find an object. Refer to About Concurrency for more details on the optional concurrency argument.

• method %GetSwizzleObject(force As %Integer = 0, ByRef oid As %ObjectIdentity) as %Status
%GetSwizzleObject() is used to obtain the serial value of the object that can later be used by %SetSerial() to restore the object. It calls %SerializeObject() which returns the serialized state of the object or the OID (for persistent objects). Before calling %GetSerial(), %GetSwizzleObject() calls %AddToSaveSet([force]) which will result in calling the %GetSwizzleObject() method of other referenced objects, passing along the value of force.

%GetSwizzleObject automatically detects and handles circular references between objects. For example, %GetSwizzleObject will detect if object A refers to object B and object B likewise refers to object A. In this case it will avoid falling into an infinite, recursive loop.

Note that either reference attribute, A to B or B to A, can be specified as being a required attribute but not both of them. If both reference attributes are required then %GetSwizzleObject will fail.

By default %GetSwizzleObject automatically manages transactions. You can enable and disable automatic transaction support using the $$SetTransactionMode^%apiOBJ() routine.

When %GetSwizzleObject serializes an object, it initiates one transaction (by calling TSTART) for the entire set of serializations, including the original object and any related objects. If the serialization operation is successful, %GetSwizzleObject will issue a TCOMMIT command to commit the transaction and write the data to the database. If %GetSwizzleObject encounters an error during the transaction it rolls back the entire transaction and performs the following actions:

  • It issues a TROLLBACK command to rollback any changes to the database that may have occurred. (In the case of persistent objects with system assigned ids changes to the on-disk counter value, used to determine the next available object id number, are not rolled back.)
  • It attempts to restore the in-memory state of all the objects involved in the transaction to their pre-transaction state. This includes restoring any modified flags, and restoring to null ("") any OID values that have been assigned during the course of the transaction. Additional property values changed during the course of the transaction are not restored, however.
  • It calls the %RollBack method on each object involved with the transaction. The order in which the %RollBack methods are called is undefined. %RollBack will call a user-written %OnRollback method if it is present.

Returns a %Status value indicating success or failure.

• final classmethod %Open(initvalue As %ObjectIdentity, concurrency As %Integer = -1, ByRef sc As %Status = $$$OK) as %ObjectHandle
Creates an instance (in-memory version) of a serial object from the serialized value initvalue. Note that concurrency is not used, the argument is kept to keep the interface consistent with %Library.Persistent. If an error occurrs it is returned by refence in sc.
• final classmethod %OpenId(initvalue As %String, concurrency As %Integer = -1, ByRef sc As %Status = $$$OK) as %ObjectHandle
Swizzles a serial object from the value passed and returns an OREF referring to the object. initvalue is the Id (serial value, not a full OID) value of the object to swizzle.

%OpenId is identical in operation to the %Open method except that it uses and Id value instead of an OID value to find an object instance.

%OpenId returns an OREF value that refers to the in-memory object instance.

• classmethod LogicalToOdbc(val As %String = "") as %String
Converts the serial state of this serial object to a delimited string using the value of the ODBCDELIMITER parameter as a delimiter.
• classmethod OdbcToLogical(val As %String = "") as %String
Converts the value of an incoming delimited string to a serialized state using the value of the ODBCDELIMITER parameter as a delimiter.