With association properties you can create a relationship between classes in an object store. For example, by creating association properties you can establish a relationship between the Document class and the Annotation class. When the user creates a document and annotations based on these two classes, the objects are linked (related) by the association properties. By creating an association, or relationship, between objects you can programmatically discover and navigate between associated objects. Association properties also allow you to specify and enforce certain behavior among related objects, such as how to perform deletions of related objects.
Association properties are object-valued properties that you create using the Create Association Properties wizard. Like all other Content Engine properties, if you add an association property to a superclass, the property is added to all new and existing subclasses. When you remove an association property from a class, the Content Engine removes the corresponding association property from the related class. The association properties are not removed from any subclasses that inherited the properties, however the relationship is broken.
The relationships created by association properties have three primary characteristics: cardinality, dependency, and reflectivity. You specify values for each of these characteristics using the Create Association Properties wizard.
Association Cardinality
A relationship's cardinality defines the number of objects that can exist
on each side of the relationship. The Content Engine supports the following
types of cardinality:
Association Dependencies and Delete Actions
Associations dependencies establish which objects in the relationship
are dependent on another object. Association dependencies determine what
actions the Content Engine should take when the user attempts to delete
one of the objects in the relationship. The Delete Action property of
each object is assigned a value based on the dependency you specify during
the Create Association Properties wizard. The Content Engine supports
the following types of dependencies:
Association Reflectivity
Reflectivity enables an object in an association to identify the other
objects in the relationship. The Create Association Property wizard creates
association properties in pairs and adds one association property to each
of the two classes for which you are defining a relationship. These association
properties are pointers by which objects link to one another. These pointers
are set to point to the appropriate objects either manually in the Enterprise
Manager or programmatically by applications you create.
Association Properties Example
A Content Engine object store at an insurance company might have a document
class called Policies and another document class called Claims. Within
the insurance company, policies and claims are related in the following
manner:
To define this association using the Create Association Properties wizard, you would complete the following steps, assuming you already had policies named Policy and Claims.
Assigning objects to association properties
The Content Engine does not support assigning objects to association properties at both ends of the association pair. In the example above, to assign an insurance claim to a policy, it is necessary to go to the properties page of the claim object and assign the specific policy object to the association property of the claim. The association property of the policy object is then enumerated automatically and is also read-only. To assign additional claims to the same policy, repeat the process for each claim object.