GetClassObjects
Purpose
The CMetaObject class GetClassObjects function returns current versions of objectList (list of CMetaObjects) in the specified class.
Description
If strObjName is not specified (NULL), all objects in the class are returned.
If strObjName is specified, only the objects of the specified name in the class are returned. The name search is not case sensitive.
Specifying an empty string (“”) for strObjName returns objects in the class with no name.
Requirements
The internally unique or globally unique class ID must be specified.
The objects in the list returned by GetClassObjects are in ascending sort order of the object names. Use GetClassObjectsByProperty to specify properties to sort the list by.
Syntax
HRESULT GetClassObjects(
vector<CMetaObject> &objectList,
const GUID &gClassID,
const OBJECTID_t lClassID = NULLLOID,
LPCTSTR strObjName = NULL);
HRESULT GetClassObjects(
vector<CMetaObject> &objectList,
const GUID &gClassID,
const OBJECTID_t lClassID,
LPCTSTR strObjName,
const bool WithLock);
Argument |
In/Out |
Description |
objectList |
In/Out |
Reference to the list of CMetaObjects that will hold the objects returned. The list is cleared before adding the return collection. |
gClassID |
In |
Class GUID. Can be set to NULLGUID if gClassID is set. |
lClassID |
In |
Class internal ID. Optional if gClassID is set. |
strObjName |
In |
Specific name of the objects in the class being 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. |