Class Reference
%Library.ListOfDataTypes
Server:irisdocs1
Instance:IRISLATEST
User:UnknownUser
 
-
  [%SYS] >  [%Library] >  [ListOfDataTypes]
Private  Storage

serial class %Library.ListOfDataTypes extends %Collection.AbstractListOfDT, %SerialObject

The %ListOfDataTypes class represents a list of literal (i.e., data type) values. each of which is associated with a numeric position in the list. The first element in the list is stored at position 1.

Refer to %Collection.AbstractList for a description of the varous array methods. These classes can be used 'stand alone' to store a collection.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
1 3 23


Summary

Properties
Data ElementType Size

Methods
%AddToSaveSet %AddToSyncSet %ClassIsLatestVersion %ClassName
%ConstructClone %Delete %DeleteId %DispatchClassMethod
%DispatchGetModified %DispatchGetProperty %DispatchMethod %DispatchSetModified
%DispatchSetMultidimProperty %DispatchSetProperty %Extends %GetParameter
%GetSwizzleObject %IsA %IsModified %IsNull
%New %NormalizeObject %ObjectIsNull %ObjectModified
%OnBeforeAddToSync %OnDetermineClass %Open %OpenId
%OriginalNamespace %PackageName %RemoveFromSaveSet %ResolveConcurrencyConflict
%SerializeObject %SetModified %SyncObjectIn %SyncTransport
%ValidateObject BuildValueArray Clear Count
DisplayToLogical Find GetAt GetNext
GetPrevious Insert InsertAt InsertList
InsertOrdered LogicalToDisplay LogicalToOdbc Next
OdbcToLogical Previous RemoveAt SetAt


Parameters

• parameter ELEMENTTYPE;
The type (classname:propertyname) of the elements stored in the collection.

Properties

• property Data as %RawString [ MultiDimensional ];
Data is a private property used to hold the contents of the list.
• property ElementType as %RawString [ InitialExpression = ..#ELEMENTTYPE ];
The type (classname:propertyname) of the elements stored in the collection.
• property Size as %Integer [ InitialExpression = 0 ];
Size is the number of elements contained in the list.

Methods

• method %ValidateObject(force As %Integer) as %Status
This method validates an object. The %Save method of a persistent class calls it before filing any objects in the database. The %ValidateObject method of a referencing object can call it. You can also call it explicitly at any time.

%ValidateObject does the following:

  1. It tests if any required property values are missing.
  2. If the PROPERTYVALIDATION class parameter is set to ValidateOnSave, it validates each non-null property value by calling the property method IsValid on each literal property and the object's %ValidateObject method for object-valued properties.
  3. If present, it will call a user-supplied %OnValidateObject method.

If any of these tests fail, %ValidateObject immediately returns an error value. It is up to the caller of %ValidateObject to process the error value.

Returns a %Status value indicating success or failure.

• classmethod BuildValueArray(serialized As %Binary, array As %Binary) as %Status
Constructs array(key)=value for each element in the serialval value.

Returns a %Status value indicating success or failure.

• method Clear() as %Status
Clears the contents of the list.

Returns a %Status value indicating success or failure.

• final method Count() as %Integer
Returns the number of elements contained in the list.
• classmethod DisplayToLogical(val As %String = "", delim As %String = {$char(13, 10)}) as %String
Converts the value of an incoming delimited string to a serialized state using the value of the delim argument as a delimiter.
• method Find(element As %String, key As %Integer) as %String
Starting from, and including, position key, Find finds the next element in the list with value equal to element. If key is a null string, Find starts at the beginning of the list.

Find returns the position of the found element or null string ("") if no element was found.

• final method GetAt(key As %Integer = 0) as %String
Finds and returns the value of the element at position key in the list.

GetAt returns the value of the element at location key or null string ("") if no element is found.

• method GetNext(ByRef key As %Integer) as %String
Finds and returns the value of the element at the position after key in the list. If key is a null string (""), it returns the value of the first element in the list.

The value of key, which is passed by reference, is updated to the position value of the returned element or null string ("") if key is at the end of the list.

• method GetPrevious(ByRef key As %Integer) as %String
Finds and returns the value of the element at the position before key in the list. If key is a null string (""), it returns the value of the last element in the list.

The value of key, which is passed by reference, is updated to the position value of the returned element or null string ("") if key is at the beginning of the list.

• method Insert(element As %String) as %Status
Inserts an element with value element at the end of the list.

Returns a %Status value indicating success or failure.

• method InsertAt(element As %String, key As %Integer) as %Status
Inserts an element with value element at position key.

To make room for the new element, the elements previously at or following position key are moved up by one position.

key must be in the following range:

1 <= key <= Count() + 1
Returns a %Status value indicating success or failure.
• method InsertList(inslist As %String) as %Status
Inserts a list with value inslist at the end of the list.

Returns a %Status value indicating success or failure.

• method InsertOrdered(element As %String) as %Status
Inserts an element with value element into the list at the correct ordered position. The elements in the list are shifted to accommodate the new element as necessary.

Returns a %Status value indicating success or failure.

• classmethod LogicalToDisplay(val As %String = "", delim As %String = {$char(13, 10)}) as %String
Converts the serial state of this list object to a delimited string using the value of the %delim argument as a delimiter.
• classmethod LogicalToOdbc(val As %String = "") as %String
Converts the serial state of this list object to a delimited string using the value of the ODBCDELIMITER parameter as a delimiter.
• final method Next(key As %Integer = 0) as %Integer
Finds and returns the index value of the element at the location following key in the list. If key is a null string (""), then Next returns the position of the first element in the list (1).
• 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.
• final method Previous(key As %Integer = 0) as %Integer
Finds and returns the index value of the element at the location preceding key in the list. If key is a null string (""), then Next returns the position of the last element in the list.
• method RemoveAt(key As %Integer) as %String
Removes the element at position key in the list. The elements following position key are moved to fill in the resulting gap.

RemoveAt returns the value of the removed element or null string ("") if no element was removed.

• method SetAt(element As %String, key As %Integer) as %Status
Sets the value of the element at position key to element.

Returns a %Status value indicating success or failure.



Copyright (c) 2019 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.