:: Table of Contents ::
4.7 Sets
4.7.1 Introduction
4.7.2 Set
4.7.3 OrderedSet
4.7.4 SetManager
 
Subchapter 4.7: Sets
4.7.1 Introduction

Often one needs to store a collection of ids so that the can be grouped together and maybe ordered. Sets provide a global service for creating, accessing, and modifying persistant, ordered, groups of ids.

4.7.2 Set

The most basic of sets, the set provides the following methods:

A set is an iterator which can have items added and removed from it.

4.7.3 OrderedSet

In addition to the methods of the Set class, the OrderedSet provides the following methods:

These allow the a persistant order to be maintained. When addItem() is called, the new Id is added to the end of the Set.

4.7.4 SetManager

The SetManager service provides a global way to access Sets as well as a place to cache created Set objects so that references can be passed out to each instead of re-instatiating them. As well, the SetManager stores the database index for the database in which the Sets are stored, so that this configuration does not need to be maintained by the application.