SEDRIS Reference Manual
APPENDIX A - Transmittal Access Level 0 API
Functions
SE AddComponentRelationship
extern SE_Return_Code
SE_AddComponentRelationship
(
SE_Object aggregate_object,1
SE_Object component_object,2
SE_Object link_object3
);

Definition

Adds a composition relationship from aggregate_object to component_object, provided that the following criteria are met.

  1. Either aggregate_object or component_object shall be a resolved object, or both shall be resolved objects. If both aggregate_object and component_object are resolved, then link_object (if provided) shall be a resolved object; otherwise, link_object may be unresolved.

  2. aggregate_object shall reside in a transmittal that has been explicitly opened with either SE_AM_CREATE or SE_AM_UPDATE.

  3. component_object, if not in the same transmittal as aggregate_object, shall be a published object.

  4. link_object, if not in the same transmittal as aggregate_object, shall be a published object.

NOTE: Relationships between objects in different transmittals are not implicitly bi-directional, so if the component object is unresolved, then the relationship will be uni-directional from the aggregate to the component.


Returns

SE_RETCOD_SUCCESS and the requested relationship is added, if valid parameters were passed in and all operations succeeded.
SE_RETCOD_FAILURE and the status code is set appropriately if the call failed.

Status Codes

SE_Status_Code(s) when SE_RETCOD_SUCCESS is returned:

SE_STATCODE_SUCCESS set upon successful completion

SE_Status_Code(s) when SE_RETCOD_FAILURE is returned:

SE_STATCODE_UNPUBLISHED_OBJECT set if component_object is in another transmittal than aggregate_object, but is not published by that transmittal or vice-versa.
SE_STATCODE_UNRESOLVED_INPUT_OBJECT set if
  1. aggregate_object and component_object are unresolved, or
  2. link_object is an unresolved object, and the aggregate_object and component_object are both resolved.
SE_STATCODE_INVALID_ACCESS_MODE set if
  1. aggregate_object (or link_object if specified) is in a transmittal that is not open for creation or modification.
  2. component_object is in a transmittal that is not open for creation or modification.
SE_STATCODE_INACTIONABLE_FAILURE set if
  1. the DRM does not define a valid composition relationship between the classes instanced by aggregate_object and component_object;
  2. the relationship defined between aggregate_object and component_object requires a link_object, but the link_object supplied was not of the class specified for the relationship;
  3. the relationship defined between aggregate_object and component_object does not take a link object, but one was supplied;
  4. or the function fails for any other reason

Parameters Notes

1 object to which a component is being added

2 component object being added

3 the link object that will be traversed to reach the component object, if applicable; must be resolved, if provided.


Prev: SE_AddAssociateRelationship. Next: SE_AllocDataTableData. Up:Index.

Last updated: July 26, 2006 Copyright © 2006 SEDRIS