GetClassObjectKeys
Purpose
The GetClassObjectKeys function returns a list of CMetaObjectKeys (contains object id and name only) which identify the current versions of objects in the specified class. The object keys in the list returned by GetClassObjectKeys are in ascending sort order of the object names.
Description
The GetClassObjectKeys function returns the names and object ids of class objects without having to read the entire collection of objects into memory, thereby minimizing the use of memory and processing time.
Requirements
The internally unique or globally unique class ID must be specified.
Syntax
HRESULT GetClassObjectKeys(
vector<CMetaObjectKey> &objectKeyList,
const GUID &gClassID,
const OBJECTID_t lClassID = NULLLOID);
HRESULT GetClassObjectKeys(
vector<CMetaObjectKey> &objectKeyList,
const GUID &gClassID,
const OBJECTID_t lClassID,
LPCTSTR strObjName,
const bool WithLock = false);
Argument |
In/Out |
Description |
objectKeyList |
In/Out |
Reference to the list of CMetaObjectKeys that will hold the object keys returned. The list is cleared before adding the return collection. |
gClassID |
In |
Global unique Class ID. Can be set to NULLGUID if lClassID is set. |
lClassID |
In |
Internal Class ID. Optional if gClassID is set. |
strObjName |
In |
Specific name of object in the collection to be returned. |
WithLock |
In |
WithLock=true keeps the IClassID table locked for WRITE. Use within an explicit transaction. Set WithLock to true when one of the class objects will subsequently be updated within the transaction. This prevents deadlocks caused by Teradata promotional locks. |