GetDestCollectionByProperty
Purpose
GetDestCollectionByProperty returns the collection (list of CMetaObjects) of the destination class associated with this CMetaObject for the specified relationship that matches the selection criteria.
GetDestCollectionByProperty only returns the current version for objects in the class.
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 building the sortList parameter, see “Sort List” on page 130.
Description
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. The name of the property upon which to sort the returned list can also be specified
Requirements
Syntax
HRESULT GetDestCollectionByProperty (
MetaObjectVector &objectList,
const MetaFilterInfoVector &propFilter,
const MetaObjectKeyVector &sortList,
const GUID &gRelID,
const OBJECTID_t lRelID = NULLLOID,
LPCTSTR strObjName = NULL,
const bool WithLock = false)
Argument |
In/Out |
Description |
objectList |
In/out |
Reference to the list of CMetaObjects 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 |
sortList |
In |
List of property identifiers (relative property id or name) to sort the collection by. The return list will be returned in ascending order and the sort will not be case specific. |
gRelID |
In |
Relationship GUID. |
lRelID |
In |
Relationship internal ID. |
StrObjName |
In |
Search string for names of objects in the class to be returned. |
WithLock |
In |
WithLock=true keeps the class 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. |