%Collection.AbstractArrayOfObj
Class %Collection.AbstractArrayOfObj Extends %Collection.AbstractArray [ Abstract, System = 2 ]
An array collection of objects
Methods
Find
Method Find(element As %ObjectIdentity, key As %String) As %String [ Abstract ]
Starting from, but not including, location key, finds the next element in the array with value equal to element.
If key is a null string (""), the search starts at the beginning of the array.
Find returns the key associated with the found element or null string ("") if no element is found.
GetAt
Method GetAt(key As %String = "") As %RegisteredObject [ Abstract ]
Finds and returns the value of the element associated with key.
GetAt returns the value of the element associated with key or null string ("") if no element is found.
GetNext
Method GetNext(ByRef key As %String) As %RegisteredObject [ Abstract ]
Finds and returns the value of the element at the location after key in the array. If key is a null string (""), it returns the value of the first element in the array.
The value of key, which is passed by reference, is updated to the key value of the returned element or null string ("") if key is at the end of the array.
GetPrevious
Method GetPrevious(ByRef key As %String) As %RegisteredObject [ Abstract ]
Finds and returns the value of the element at the location before key in the array. If key is a null string (""), it returns the value of the last element in the array.
The value of key, which is passed by reference, is updated to the key value of the returned element or null string ("") if key is at the beginning of the array.
RemoveAt
Method RemoveAt(key As %String, Output success As %Boolean) As %ObjectIdentity [ Abstract ]
Removes the element associated with key in the array.
RemoveAt returns the value of the removed element or null string ("") if no element was removed. It also has a success output argument that returns true if the item was removed and false if it was not.
SetAt
Method SetAt(element As %RegisteredObject, key As %String) As %Status [ Abstract ]
Sets the value of the element associated with key to element.
Returns a %Status value indicating success or failure.
FindObjectId
Method FindObjectId(id As %String, key As %Integer) As %String [ Abstract ]
Starting from, but not including, position key, FindObjectId finds the next element in the list whose ObjectId equals id. 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.
FindOref
Method FindOref(oref As %RegisteredObject, key As %String = "", id As %String) As %String [ Abstract ]
Starting from, but not including, location key, finds the next element in the array whose Oref value equals oref.
If key is a null string (""), the search starts at the beginning of the array.
FindOref returns the key associated with the found element or null string ("") if no element is found. Unswizzled references are compared to oref.%Oid() and if equal, swizzling will occur.
GetObjectAt
Method GetObjectAt(key As %String, force As %Integer = 0) As %ObjectIdentity [ Abstract ]
Finds and returns the OID value of the element associated with key.
GetObjectAt returns the OID value of the element associated with key or null string ("") if no element is found.
GetObjectIdAt
Method GetObjectIdAt(key As %String, force As %Integer = 0) As %String [ Abstract ]
Finds and returns the ID value of the element associated with key.
GetObjectIdAt returns the ID value of the element associated with key or null string ("") if no element is found.
GetObjectNext
Method GetObjectNext(ByRef key As %String) As %ObjectIdentity [ Abstract ]
Finds and returns the OID value of the element at the location after key in the array. If key is a null string (""), it returns the OID value of the first element in the array.
The value of key, which is passed by reference, is updated to the key value of the returned element or null string ("") if key is at the end of the array.
GetObjectIdNext
Method GetObjectIdNext(ByRef key As %String) As %String [ Abstract ]
Finds and returns the ID value of the element at the location after key in the array. If key is a null string (""), it returns the ID value of the first element in the array.
The value of key, which is passed by reference, is updated to the key value of the returned element or null string ("") if key is at the end of the array.
GetObjectPrevious
Method GetObjectPrevious(ByRef key As %String) As %ObjectIdentity [ Abstract ]
Finds and returns the OID value of the element at the location before key in the array. If key is a null string (""), it returns the OID value of the last element in the array.
The value of key, which is passed by reference, is updated to the key value of the returned element or null string ("") if key is at the beginning of the array.
GetObjectIdPrevious
Method GetObjectIdPrevious(ByRef key As %String) As %String [ Abstract ]
Finds and returns the ID value of the element at the location before key in the array. If key is a null string (""), it returns the ID value of the last element in the array.
The value of key, which is passed by reference, is updated to the key value of the returned element or null string ("") if key is at the beginning of the array.
SetObjectAt
Method SetObjectAt(oid As %ObjectIdentity, key As %String) As %Status [ Abstract ]
Sets the OID value of the element associated with key to element.
Returns a %Status value indicating success or failure.
SetObjectIdAt
Method SetObjectIdAt(id As %String, key As %String) As %Status [ Abstract ]
Sets the ID value of the element associated with key to element.
Returns a %Status value indicating success or failure.