DynaDictionary Class
The transient DynaDictionary class encapsulates the behavior required to access entries in member key dictionary subclasses; that is, in dictionaries in which the keys are properties in the member objects. In addition, the DynaDictionary class enables you to defer the specification of the membership and keys until run time. Dynamic dictionaries are useful in applications with requirements for:
-
Ad hoc queries or collection-based sorts without the overhead of maintaining multiple persistent dictionaries
-
Intensive collation or collection-based sorting
The sorting provided by a dynamic dictionary is sometimes referred to as an insertion sort, in which each entry is inserted in the correct place in the structure as opposed to moving the entries around to obtain the required order.
As with any collection, the size of a dynamic dictionary is limited by the maximum entries for a collection 2^32-1 (4,294,967,295) or the available disk space provided for the transient database.
Dynamic dictionaries do not offer a facility to sort objects not entirely based on a comparison of embedded attribute values; for example, the ability for you to provide your own sort compare routine is not supported.
If the membership type of a DynaDictionary is removed by deleting the class or removing the schema, any dynamic dictionaries that have been populated with that membership class are no longer valid and attempting to use it will raise exception 1046 (Invalid class number).
The DynaDictionary class fully supports the methods summarized in the following table that are inherited from superclasses.
The DynaDictionary class reimplements the methods summarized in the following table.
The reimplemented Collection class add, includes, and remove methods can be used only with member keys. The reimplemented ExtKeyDictionary class putAtKey method can be used only with external keys.
For details about the methods defined in the DynaDictionary class and usage of this class, see "DynaDictionary Methods" and "Using Dynamic Dictionaries", respectively, in the following subsections. For details about passing variable parameters to methods, see "
(None)