Previous Topic: AssocAttributeProcessor MethodsNext Topic: Reverse Associations


Defining Associations

Define associations between objects in the connector metadata file.

In the SDK sample connector, the Group is associated with the group members attribute in the Account. When a Group is deleted or renamed, update the group members attribute in all Account objects which are the members of the group to reflect the changes. Alternatively, the SDK sample could have added the code for updating the group members attribute for the Account objects in doDelete and doModfyRn. However, it uses the association to provide an example how to take the advantage provided by the framework.

Define the association between Group and group member attribute in Account.
  <property name="eTSDKGroupMembers">
                 <!-- when no "assocAttr" is specified it means a uni-directional link from this object
                        to another one using primary key (i.e. naming attribute) -->
                <metadata name="refObjectType">
                    <value><strValue>eTSDKGroup</strValue></value>
                </metadata>
  </property>