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:

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.

Object ::cloneSelf Object ::cloneSelfAs Collection::copy Object :: copySelf
Object ::copySelfAs Dictionary::createIterator Collection::getOwner Collection::indexOf
Collection::inspect Collection::inspectModal Collection::instantiate Collection::isEmpty
Collection::maxSize Collection::size    

The DynaDictionary class reimplements the methods summarized in the following table.

Collection::add Collection::clear Collection::first Dictionary::getAtKey
Dictionary::getAtKeyGeq Dictionary::getAtKeyGtr Dictionary::getAtKeyLeq Dictionary::getAtKeyLss
Collection::includes Dictionary::includesKey Collection::indexOf Collection::indexOf64
Collection::last Collection::maxSize Collection::maxSize64 Collection::purge
ExtKeyDictionary::putAtKey Collection::remove Dictionary::removeKey Dictionary::removeKeyEntry
Dictionary::startKeyGeq Dictionary::startKeyGtr Dictionary::startKeyLeq Dictionary::startKeyLss

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 "Passing Variable Parameters to Methods", in Chapter 1 of the JADE Developer’s Reference.

Dictionary

(None)