Managing collections

Collection methods manage collections in the Common Data Model. You can use the collection methods to add and remove members in a collection, and to retrieve all collections to which a specific managed element belongs. Note that these methods are deprecated. For equivalent methods related to CustomCollections see the description of each deprecated method.

For related information, see Managing grouping patterns.

The Collection methods table describes the collection methods you can use.
Table 1. Collection methods
Method Description

addCollectionMembers(Guid collectionGuid, Guid[] guids)

Add members to a collection. This method is unavailable in the Enterprise JavaBeans (EJB) interface.

This method is deprecated. Use updateGroupingPattern(GroupingPattern groupingPattern) method followed by one of runPatternNow(...) methods instead.

findCollections(Guid guid, String[] permissions)

Retrieve all collections to which the specified managed element belongs. A collection can contain other collections, but this method returns only the first-level of collection to which the specified managed element belongs.

This method is deprecated. Use findCustomCollections(Guid guid, String[] permissions) method instead.

removeCollectionMembers(Guid collectionGuid, Guid[] guids)

Remove members from a collection. Members of a collection can be removed by specifying an array of collection GUID attributes or an array of managed element GUID attributes. When a member to be removed is not currently a member of the collection, the member is ignored.

This method is deprecated. Use updateGroupingPattern(GroupingPattern groupingPattern) method followed by one of runPatternNow(...) methods instead.