ICollectionDef Interface
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 minimum and maximum number of items in a collection.
-
Whether or not the collection type is an origin collection type.
-
Whether or not the collection type permits the naming of destination objects, and if so, whether those names are case-sensitive, and required to be unique.
-
Whether or not the collection type permits the explicit sequencing of items in the collection.
-
What happens to related objects when objects or relationships in the collection are deleted.
-
Whether or not origin collections of this type are automatically copied to new object versions by the CreateVersion method.
-
Whether the MergeVersion method combines origin collections of this type as a whole, or item by item.
-
Whether the FreezeVersion method requires that destination object versions of relationships of this type be frozen before the attendant origin object versions can be frozen.
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 IInterfaceDef interface.
When to Use
Use the ICollectionDef interface to retrieve or modify the properties of a collection type, or to determine the kind of relationship that the collection implements.
Methods
IUnknown Method |
Description |
QueryInterface |
Returns pointers to supported interfaces. |
AddRef |
Increments the reference count. |
Release |
Decrements the reference count. |
IDispatch Method |
Description |
GetIDsOfNames |
Maps a single member and a set of argument names to a corresponding set of dispatch identifiers. |
GetTypeInfo |
Retrieves a type information object, which can be used to get the type information for an interface. |
GetTypeInfoCount |
Retrieves the number of type information interfaces that an object provides (either 0 or 1). |
Invoke |
Provides access to properties and methods exposed by an Automation object. |
IRepositoryDispatch Method |
Description |
get_Properties |
Retrieves the IreposProperties interface pointer. The IreposProperties interface provides access to the Properties collection. |
Properties
Property |
Description |
Flags |
Flags that determine the behavior of this type of collection. |
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. |