About association properties

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.

  1. Define an object-valued property named AssociatedClaims on class Policy.
  2. Define an object-valued property named AssociatedPolicy on class Claims.
  3. Specify the type of association as One-To-Many; one Policy can have many claims.
  4. Define dependency such that when the policy is deleted, the associated claims are deleted as well.

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 previous example, 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.