First page Back Continue Last page Text

oracle adf workshop

Notes:


Types of Associations

Association: An association is a relationship between two entities that are not completely dependent on each other. Each end of the association may exist without the other, and either may be deleted without deleting the other. In Unified Modeling Language (UML), an association is represented as a line.

Composition: A composition relationship means that the source entity owns the destination entity object. The destination entity object cannot exist without the owning entity object existing first. The source entity object is a container for the destination entity object. For example, an order owns the order lines associated with it. In a composition, the source cannot be deleted until all the destination items are deleted. In UML, a composition is represented as a line with a solid diamond shape at the source end.

Compositions and Validation

When a change is made to the destination entity, a validate message is sent to the source. The source entity’s validate() method is called when the transaction is committed.

The composition relationship also dictates the sequence of various operations at run time. For example, child validation is forced before parent. Parent posting is forced before child posting. There are a number of additional composition-related features that you can control through settings on the Association Properties page of the Create Association Wizard, or the Association Editor.