CollectionDef Object

See Also

A collection type (also referred to as a collection definition) defines how instances of a particular type of collection will behave. The properties of the collection type determine:

The kind of relationship that a particular collection type uses to relate objects to each other is determined by its CollectionItem collection. The CollectionItem collection associates a single relationship type to the collection type.

To add a new collection type, use the InterfaceDef object.

A CollectionDef object is also a RepositoryObject. In addition to the members described here, CollectionDef objects also provide the members that are defined for Repository objects.

When to Use

Use the CollectionDef object to retrieve or modify the properties of a collection type, to determine the kind of relationship that the collection implements, or to determine the interface to which the collection is attached.

Properties

Property Description
DispatchID The dispatch identifier to use when accessing an instance of this type of collection.
Flags Flags that specify details about this collection definition.
IsOrigin Indicates whether or not collections of this type are origin collections.
MaxCount The maximum number of target objects that can be contained in a collection of this type.
MinCount The minimum number of target objects that must be contained in a collection of this type.

Collections

Collection Description
CollectionItem The collection of one relationship type that defines the relationship between target objects of this type of collection and a single source object.
Interface The interface to which this collection definition is attached.
Properties The collection of all persistent properties that are attached to the CollectionDef object.