GetDestCollectionVersionKeys
Purpose
GetDestCollectionVersionKeys returns a list of CMetaVersionedObjectClassKey objects (contains object id, object name, object version, class id, and class name) or a list of CMetaRelationshipKey objects (contains object id, object name, object version, class id, class name, and explanation string) which identify the collection of the destination class objects associated with this CMetaObject for the specified relationship.
Description
This API is expected to be used by a meta data browser to enable it to display the name/id of objects in a collection without having to read the entire collection of objects into memory. This is important for large collections that would consume a large amount of process space if all read into memory.
The function allows the programmer to specify the property id, property value and comparison operator on which to perform the search. The search is performed on the list of objects in the collection. If multiple properties are specified for the search, the logical operator between the property searches must be specified.
GetDestCollectionVersionKeys works with any version of the object and by default returns only versions of the destination objects that are reachable through rigid relationships and satisfy the other search conditions. Setting rigidRelsOnly to false will return all destination object versions that satisfy the other search conditions.
Requirements
Syntax
HRESULT DestCollectionVersionKeys(
MetaVersionedObjectClassKeyVector& objectKeyList,
const MetaFilterInfoVector &propFilter,
const GUID &gRelID,
const OBJECTID_t lRelID = NULLLOID,
LPCTSTR strObjName = NULL,
LPCTSTR strLabel = NULL,
const bool WithLock = false,
const OBJECTID_t returnClass = NULLLOID,
const bool allClasses = false,
const bool skipValidation = false,
const bool rigidRelsOnly = true);
HRESULT DestCollectionVersionKeys(
vector<CMetaRelationshipKey>& objectKeyList,
const MetaFilterInfoVector &propFilter,
const GUID &gRelID,
const OBJECTID_t lRelID = NULLLOID,
LPCTSTR strObjName = NULL,
LPCTSTR strLabel = NULL,
const bool WithLock = false,
const OBJECTID_t returnClass = NULLLOID,
const bool allClasses = false,
const bool skipValidation = false,
const bool rigidRelsOnly = true);
For more information on creating the propFilter for the search, see Chapter 8: “CMetaFilterInfo Class.”
For more information on building the strObjName parameter for a search, see “Name Search” on page 131.
For more information on the settings for allClasses and returnClass, see “Inheritance” on page 132.
Argument |
In/Out |
Description |
ObjectKeyList |
In/out |
Reference to the list of object keys that will hold the collection returned. The list is cleared before adding the return collection. |
propFilter |
In |
List of FilterInfo objects containing the property id and value to use to perform the search |
gRelID |
In |
Relationship GUID. |
lRelID |
In |
Relationship internal ID. |
StrObjName |
In |
Search string for names of objects in the collection to be returned. |
strLabel |
In |
Label string to filter the objects; only object versions with the label will be returned. |
WithLock |
In |
WithLock=true keeps the class table of the Origin Collection locked for WRITE. Use within an explicit transaction. Set WithLock to true when one of the Origin Collection objects will subsequently be updated within the transaction. This prevents deadlocks caused by Teradata promotional locks. |
returnClass |
In |
If the allClasses parameter is = true, the returnClass parameter is ignored. If the allClasses parameter = false: |
allClasses |
In |
If the origin class in the relationship is a superclass, setting allClasses = true will return all class types (superclass and subclasses). If allClasses = false, the origin class returned is determined by the returnClass parameter. If allClasses = true and the origin class in the relationship is not a superclass, only objects of the origin class defined in the relationship are returned. |
skipValidation |
In |
The function validates that the id of the object is an object in the destination class (or subclass) of the relationship. If returnClass is specified, the function will validate that the returnClass is the origin class (or subclass) of the relationship. If skipValidation is true, this validation is not performed. If the validation is not performed and the validation would have returned an error, the function will return zero objects in the ObjectList. |
rigidRelsOnly |
In |
If set true, the function will only return destination objects that are found through rigid relationships; that is, they are the latest version of the destination object associated with the version of the calling object. If set false, the function will return all destination object versions that can be reached from the origin object version. |