ExternalCollection Class
The ExternalCollection class provides the common protocol for external collection classes, which represent the result set of a selection from an external data source.
External collections are virtual, in the sense that member instances do not exist until they are first referenced. When a member is first referenced by a direct key access or by an iteration, an external proxy instance is created, which represents the corresponding row in the result set. (Proxy classes act as the mediators between Jade and the external relational database, and are derived from the ExternalObject class.)
External collections provide operations for direct and relative key access, and may be used in collaboration with external iterators to access rows in a result set. External collections are read-only; that is, operations such as add, remove, clear, and purge are not supported. The Jade compiler prevents the use of updating methods for external collections, in the same way that they are prevented for automatic collections participating in an inverse relationship.
There is a corresponding external collection for each of the standard Jade collection types listed in the following table.
Collection Type | Description |
---|---|
ExternalCollection | Abstract superclass of all external collections |
ExternalArray | Ordered collection that requires an ORDER BY clause sort specification and an optional WHERE clause filtering specification |
ExternalDictionary | Ordered collection that requires keys, an ORDER BY clause sort specification, and an optional WHERE clause filtering specification |
ExternalSet | Unordered collection that can have an optional WHERE clause filtering expression |
For details about the properties and methods defined in the ExternalCollection class, see "ExternalCollection Properties" and "ExternalCollection Methods", in the following subsections.