IRISLIB database
ArrayOfObjects Class Reference
Inheritance diagram for ArrayOfObjects:
Collaboration diagram for ArrayOfObjects:

Public Member Functions

_.Library.Status OnConstructClone (_.Library.RegisteredObject oref, _.Library.Boolean deep, _.Library.String cloned)
 This callback method is invoked by the <METHOD>ConstructClone</METHOD> method to. More...
 
_.Library.Status Clear ()
 Clears the contents of the array. More...
 
_.Library.Integer Count ()
 Returns the number of elements contained in the array.
 
_.Library.Boolean Define (_.Library.String key)
 This method is deprecated. More...
 
_.Library.String Find (_.Library.ObjectIdentity element, _.Library.String key)
 Starting from, but not including, location key,. More...
 
_.Library.String FindObjectId (_.Library.String id, _.Library.Integer key)
 Starting from, but not including, position key, FindObjectId finds. More...
 
_.Library.RegisteredObject GetAt (_.Library.String key)
 Finds and returns the OREF value of the element associated with key. More...
 
_.Library.RegisteredObject GetNext (_.Library.String key)
 Finds and returns the OREF value of the element at the location after key More...
 
_.Library.ObjectIdentity GetObjectAt (_.Library.String key, _.Library.Integer force)
 Finds and returns the OID value of the element associated with key. More...
 
_.Library.String GetObjectIdAt (_.Library.String key, _.Library.Integer force)
 Finds and returns the ID value of the element associated with key. More...
 
_.Library.String GetObjectIdNext (_.Library.String key)
 Finds and returns the ID value of the element at the location after key More...
 
_.Library.String GetObjectIdPrevious (_.Library.String key)
 Finds and returns the ID value of the element at the location before key More...
 
_.Library.ObjectIdentity GetObjectNext (_.Library.String key)
 Finds and returns the OID value of the element at the location after key More...
 
_.Library.ObjectIdentity GetObjectPrevious (_.Library.String key)
 Finds and returns the OID value of the element at the location before key More...
 
_.Library.RegisteredObject GetPrevious (_.Library.String key)
 Finds and returns the OREF value of the element at the location before key More...
 
_.Library.Boolean IsDefined (_.Library.String key)
 Returns true (1) if a value is defined at location key,. More...
 
_.Library.String Next (_.Library.String key)
 Finds and returns the key value of the element at the location following key in the array. More...
 
_.Library.String Previous (_.Library.String key)
 Finds and returns the key value of the element at the location preceding key in the array. More...
 
_.Library.ObjectIdentity RemoveAt (_.Library.String key, _.Library.Boolean success)
 Removes the element associated with key in the array. More...
 
_.Library.Status SetAt (_.Library.RegisteredObject oref, _.Library.String key)
 Sets the OREF value of the element associated with key to element. More...
 
_.Library.Status SetObjectAt (_.Library.ObjectIdentity oid, _.Library.String key)
 Sets the OID value of the element associated with key to element. More...
 
_.Library.Status SetObjectIdAt (_.Library.String id, _.Library.String key)
 Sets the ID value of the element associated with key to element. More...
 
- Public Member Functions inherited from AbstractArrayOfObj
_.Library.String Find (_.Library.ObjectIdentity element, _.Library.String key)
 An array collection of objects. More...
 
_.Library.String FindObjectId (_.Library.String id, _.Library.Integer key)
 Starting from, but not including, position key, FindObjectId finds. More...
 
_.Library.String FindOref (_.Library.RegisteredObject oref, _.Library.String key, _.Library.String id)
 Starting from, but not including, location key,. More...
 
_.Library.RegisteredObject GetAt (_.Library.String key)
 Finds and returns the value of the element associated with key. More...
 
_.Library.RegisteredObject GetNext (_.Library.String key)
 Finds and returns the value of the element at the location after key More...
 
_.Library.ObjectIdentity GetObjectAt (_.Library.String key, _.Library.Integer force)
 Finds and returns the OID value of the element associated with key. More...
 
_.Library.String GetObjectIdAt (_.Library.String key, _.Library.Integer force)
 Finds and returns the ID value of the element associated with key. More...
 
_.Library.String GetObjectIdNext (_.Library.String key)
 Finds and returns the ID value of the element at the location after key More...
 
_.Library.String GetObjectIdPrevious (_.Library.String key)
 Finds and returns the ID value of the element at the location before key More...
 
_.Library.ObjectIdentity GetObjectNext (_.Library.String key)
 Finds and returns the OID value of the element at the location after key More...
 
_.Library.ObjectIdentity GetObjectPrevious (_.Library.String key)
 Finds and returns the OID value of the element at the location before key More...
 
_.Library.RegisteredObject GetPrevious (_.Library.String key)
 Finds and returns the value of the element at the location before key More...
 
_.Library.ObjectIdentity RemoveAt (_.Library.String key, _.Library.Boolean success)
 Removes the element associated with key in the array. More...
 
_.Library.Status SetAt (_.Library.RegisteredObject element, _.Library.String key)
 Sets the value of the element associated with key to element. More...
 
_.Library.Status SetObjectAt (_.Library.ObjectIdentity oid, _.Library.String key)
 Sets the OID value of the element associated with key to element. More...
 
_.Library.Status SetObjectIdAt (_.Library.String id, _.Library.String key)
 Sets the ID value of the element associated with key to element. More...
 
- Public Member Functions inherited from AbstractArray
_.Library.Boolean Define (_.Library.String key)
 This method is deprecated. More...
 
_.Library.String Find (_.Library.RawString element, _.Library.String key)
 Starting from, but not including, location key,. More...
 
_.Library.Boolean IsDefined (_.Library.String key)
 Returns true (1) if a value is defined at location key,. More...
 
_.Library.String Previous (_.Library.String key)
 Finds and returns the key value of the element at the location preceding key in the array. More...
 
_.Library.RawString RemoveAt (_.Library.String key)
 Removes the element associated with key in the array. More...
 
_.Library.Status SetAt (_.Library.RawString element, _.Library.String key)
 Sets the value of the element associated with key to element. More...
 
- Public Member Functions inherited from AbstractIterator
_.Library.RawString GetAt (_.Library.RawString key)
 Definition of iterator methods that all our collections classes use to ensure consistency. More...
 
_.Library.RawString GetNext (_.Library.RawString key)
 Finds and returns the value of the element at the location after key More...
 
_.Library.RawString Next (_.Library.RawString key)
 Finds and returns the key value of the element at the location following key in the iteration. More...
 
- Public Member Functions inherited from SwizzleObject
_.Library.Status OnJournalObject (_.Library.Integer tranid, _.Library.Integer jrnid, _.Library.String filter)
 This callback method is invoked by the <METHOD>JournalObject</METHOD> method to. More...
 
- Public Member Functions inherited from RegisteredObject
_.Library.Status OnAddToSaveSet (_.Library.Integer depth, _.Library.Integer insert, _.Library.Integer callcount)
 This callback method is invoked when the current object is added to the SaveSet,. More...
 
_.Library.Status OnClose ()
 This callback method is invoked by the <METHOD>Close</METHOD> method to. More...
 
_.Library.Status OnNew ()
 This callback method is invoked by the <METHOD>New</METHOD> method to. More...
 
_.Library.Status OnValidateObject ()
 This callback method is invoked by the <METHOD>ValidateObject</METHOD> method to. More...
 

Static Public Member Functions

_.Library.Status BuildValueArray (_.Library.Binary serialized, _.Library.Binary array)
 Constructs array(key)=value for each element in the serialval value. More...
 
- Static Public Member Functions inherited from AbstractArray
_.Library.Status BuildValueArray (_.Library.Binary serialized, _.Library.Binary array)
 Constructs array(key)=value for each element in the serialval value. More...
 
_.Library.String LogicalToOdbc (_.Library.String val, _.Library.String delim, _.Library.String class, _.Library.String method)
 Converts the serial state of this array object to a delimited string. More...
 
_.Library.String OdbcToLogical (_.Library.String val, _.Library.String delim, _.Library.String class, _.Library.String method)
 Converts the value of an incoming delimited string to a serialized state. More...
 
- Static Public Member Functions inherited from SerialObject
_.Library.String LogicalToOdbc (_.Library.String val)
 Converts the serial state of this serial object to a delimited string. More...
 
_.Library.String OdbcToLogical (_.Library.String val)
 Converts the value of an incoming delimited string to a serialized state. More...
 

Public Attributes

 Data
 Data is a private property used to hold the More...
 
 ElementType
 The type (class name) of the elements stored in the collection. More...
 
 Oref
 Private storage area used to hold OREF values. More...
 

Static Public Attributes

 CLASSNAMEINOID = None
 This parameter determines how the collection object stores OID values. More...
 
 ELEMENTTYPE = None
 The type (class name) of the elements stored in the collection.
 
- Static Public Attributes inherited from AbstractArray
 ELEMENTTYPE = None
 The type (class name) of the elements stored in the collection.
 
- Static Public Attributes inherited from SerialObject
 ODBCDELIMITER = None
 A serial object is converted to a delimited string containing the. More...
 
 SERIALDELIMITER = None
 This parameter specifies the delimiter character used when created a serialized. More...
 
 VALIDIFNULL = None
 If true, ValidateObject will return $$$OK for instances that are null as determined by IsNull(). More...
 
- Static Public Attributes inherited from SwizzleObject
 DEFAULTCONCURRENCY = None
 DEFAULTCONCURRENCY is the default value for the concurrency formal argument. More...
 
 JOURNALSTREAM = None
 If OBJJOURNAL is true then the value of the JOURNALSTREAM parameter defines whether or not. More...
 
 OBJJOURNAL = None
 if OBJJOURNAL is TRUE then inserts, updates and deletes will be logged in ^OBJ.JournalT More...
 
- Static Public Attributes inherited from RegisteredObject
 CAPTION = None
 Optional name used by the Form Wizard for a class when generating forms. More...
 
 JAVATYPE = None
 The Java type to be used when exported.
 
 PROPERTYVALIDATION = None
 This parameter controls the default validation behavior for the object. More...
 

Private Member Functions

_.Library.Status AddToSaveSet (_.Library.Integer force, _.Library.Integer refresh)
 Overrides SerialObject implementation. More...
 
_.Library.Status SerializeObject (_.Library.Binary serial, _.Library.Integer partial)
 This method retrieves all of the serial values for referenced objects and places them into the instance variables,. More...
 
_.Library.Status UnSwizzleAt (_.Library.String key, _.Library.Integer force)
 Unswizzles (removes from memory) the element associated with key in the array. More...
 

Detailed Description

For information on this class, see Working with Collections.

The <CLASS>ArrayOfObjects</CLASS> class represents an array of references to objects, each of which is associated with a unique key value. Keys can have any value, string or numeric. The objects referred to must be registered. They can be either persistent objects or non-id objects.

Internally, an <CLASS>ArrayOfObjects</CLASS> object contains two arrays: one for holding the OID values for the objects referred to (or their serialized state in the case of an array of non-id objects); and another for holding the OREF values for any objects that have been explicitly referred to, and hence "swizzled" into memory. Swizzling (loading an object into memory and generating an OREF value for it) happens automatically whenever the user refers to an object within the array.

For example, if array is an <CLASS>ArrayOfObjects</CLASS> object containing an array of Doctor objects (that is an array of OID values for Doctor objects stored in the database) then the following code fragment will automatically load the Doctor object associated with the key "Primary" into memory and generate an OREF value referring to the in-memory version of the Doctor object. This OREF value can then be used to access the properties and methods of the Doctor object:

Set doc=array.GetAt("Primary") Write doc.Name

Alternatively, we could use cascading dot syntax:

Set name=array.GetAt("Primary").Name

When the <CLASS>ArrayOfObjects</CLASS> object is closed (removed from memory), it will close (call Close on) all of the references it has swizzled into memory. These classes can be used 'standalone' to store a collection.

Member Function Documentation

◆ AddToSaveSet()

_.Library.Status AddToSaveSet ( _.Library.Integer  force,
_.Library.Integer  refresh 
)
private

Overrides SerialObject implementation.

Scans objects for modifications in the related list (Element)

and the terminated relationship list (DeleteOref). Modified/Scheduled to delete objects are added to the save graph.

Reimplemented from RegisteredObject.

◆ OnConstructClone()

_.Library.Status OnConstructClone ( _.Library.RegisteredObject  object,
_.Library.Boolean  deep,
_.Library.String  cloned 
)

This callback method is invoked by the <METHOD>ConstructClone</METHOD> method to.

provide notification that a clone of an object is being created. It passes in the oref of the object that was cloned in object.

If this method returns an error then the object will not be created.

Reimplemented from RegisteredObject.

◆ SerializeObject()

_.Library.Status SerializeObject ( _.Library.Binary  serial,
_.Library.Integer  partial 
)
private

This method retrieves all of the serial values for referenced objects and places them into the instance variables,.

Validates, Normalizes, and serializes the object (with a save of the persistent image if persistent).
This method is not meant to be called directly. It is called by Save and by GetSwizzleObject.

Reimplemented from RegisteredObject.

◆ UnSwizzleAt()

_.Library.Status UnSwizzleAt ( _.Library.String  key,
_.Library.Integer  force 
)
private

Unswizzles (removes from memory) the element associated with key in the array.

Returns a <CLASS>Status</CLASS> value indicating success or failure.

◆ BuildValueArray()

_.Library.Status BuildValueArray ( _.Library.Binary  serialized,
_.Library.Binary  array 
)
static

Constructs array(key)=value for each element in the serialval value.

Returns a <CLASS>Status</CLASS> value indicating success or failure.

◆ Clear()

_.Library.Status Clear ( )

Clears the contents of the array.

Both the OID and OREF values are cleared.

Returns a <CLASS>Status</CLASS> value indicating success or failure.

Reimplemented from AbstractArray.

◆ Define()

This method is deprecated.

Please use <METHOD>IsDefined</METHOD> instead.

◆ Find()

Starting from, but not including, location key,.

finds the next element in the array whose OID value equals 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.

◆ FindObjectId()

_.Library.String FindObjectId ( _.Library.String  id,
_.Library.Integer  key 
)

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.

◆ GetAt()

Finds and returns the OREF value of the element associated with key.

GetAt returns the OREF value of the element associated with key or null string ("") if no element is found.

◆ GetNext()

Finds and returns the OREF value of the element at the location after key

in the array. If key is a null string (""), it returns the OREF 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.

◆ GetObjectAt()

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()

_.Library.String GetObjectIdAt ( _.Library.String  key,
_.Library.Integer  force 
)

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.

◆ GetObjectIdNext()

_.Library.String GetObjectIdNext ( _.Library.String  key)

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.

◆ GetObjectIdPrevious()

_.Library.String GetObjectIdPrevious ( _.Library.String  key)

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.

◆ GetObjectNext()

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.

◆ GetObjectPrevious()

_.Library.ObjectIdentity GetObjectPrevious ( _.Library.String  key)

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.

◆ GetPrevious()

Finds and returns the OREF value of the element at the location before key

in the array. If key is a null string (""), it returns the OREF 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.

◆ IsDefined()

_.Library.Boolean IsDefined ( _.Library.String  key)

Returns true (1) if a value is defined at location key,.

otherwise false (0).

◆ Next()

Finds and returns the key value of the element at the location following key in the array.

If key is a null string (""), then Next returns the key value for the first element in the array.

◆ Previous()

Finds and returns the key value of the element at the location preceding key in the array.

If key is a null string (""), then <METHOD>Next</METHOD> returns the key value for the last element in the array.

◆ RemoveAt()

Removes the element associated with key in the array.

<p><b>RemoveAt</b> returns the OID value of the removed element or null string ("") 
if no element was removed. It also has a <var>success</var> output argument that
returns true if the item was removed and false if it was not.

◆ SetAt()

Sets the OREF value of the element associated with key to element.

Returns a <CLASS>Status</CLASS> value indicating success or failure.

◆ SetObjectAt()

Sets the OID value of the element associated with key to element.

Returns a <CLASS>Status</CLASS> value indicating success or failure.

◆ SetObjectIdAt()

_.Library.Status SetObjectIdAt ( _.Library.String  id,
_.Library.String  key 
)

Sets the ID value of the element associated with key to element.

Returns a <CLASS>Status</CLASS> value indicating success or failure.

Member Data Documentation

◆ CLASSNAMEINOID

CLASSNAMEINOID = None
static

This parameter determines how the collection object stores OID values.

If this parameter is set to 0, then partially-formed OID values, containing only an ID number, are used. If this parameter is set to 1, then fully-formed OID values, containing both a class name and an ID number, are used.

◆ Data

Data

Data is a private property used to hold the

contents of the array.  

◆ ElementType

ElementType

The type (class name) of the elements stored in the collection.

 

◆ Oref

Oref

Private storage area used to hold OREF values.