MetaRelationshipInfo Class
The IMetaRelationshipInfo interface of this class is used to create, read, modify or delete CMetaRelationshipDesc objects. However, after the MetaRelationshipInfo object has been created and its properties set to whatever values are appropriate, it is added to the MDS repository through the IMetaModelInfo::AddRelationship routine with this object as that routine’s parameter. This means that all the “put” properties below are only setting in-memory values and as far as the MDS repository goes, they are useful only before the call to AddRelationship or this class’s Update routine.
See Chapter 12: “AIM Classes” for more detailed information.
Property |
Type |
Description |
Common Properties |
|
|
OriginClassID |
Long |
The origin class identifier for this relationship. |
DestinationClassID |
Long |
The destination class identifier for this relationship. |
UniqueName |
Short |
The relationship contains unique names flag. |
PropagateDelete |
Short |
Propagate the delete if the relationship is deleted. |
Common Properties
See “Common Properties” on page 349.
get_PropagateDelete
Purpose:
Gets the propagate delete flag.
Syntax:
HRESULT get_PropagateDelete(
[out, retval] short *pVal);
put_PropagateDelete
Purpose:
Gets the propagate delete flag.
Syntax:
HRESULT put_PropagateDelete(
[in] short newVal);
get_UniqueName
Purpose:
Gets the UniqueNaming flag.
Syntax:
HRESULT get_UniqueName(
[out, retval] short *pVal);
put_UniqueName
Purpose:
Gets the UniqueNaming flag.
Syntax:
HRESULT put_UniqueName(
[in] short newVal);
get_DestinationClassID
Purpose:
Gets the Destination Class ID of the relationship
Syntax:
HRESULT get_DestinationClassID(
[out, retval] long *pVal);
put_DestinationClassID
Purpose:
Sets the Destination Class ID of the relationship.
Syntax:
HRESULT put_DestinationClassID(
[in] long newVal);
get_OriginClassID
Purpose:
Gets the Origin Class ID of the relationship.
Syntax:
HRESULT get_OriginClassID(
[out, retval] long *pVal);
put_OriginClassID
Purpose:
Sets the Origin Class ID of the relationship.
Syntax:
HRESULT put_OriginClassID(
[in] long newVal);
Delete
Purpose:
Use this method to delete the relationship description object from the MDS repository.
Requirements:
The object identifier must be set before calling the Delete method.
Syntax:
HRESULT Delete();
Read
Purpose:
Use this method to read the relationship description object from the MDS repository.
Requirements:
The object identifier must be set before calling the Read method.
Syntax:
HRESULT Read();
Update
Purpose:
Use this method to modify certain attributes of the MetaRelationshipInfo object after it has been created. See the Microsoft Visual C++ Programmer’s Guide for attributes that can be changed.
Syntax:
HRESULT Update();