PATH Documentation > WebObjects

Table of Contents

EOMasterPeerAssociation


Inherits from:
EOMasterDetailAssociation : EOMasterAssociation : EOAssociation : EODelayedObserver (EOControl) : Object
Implements:
NSDisposable
EOObserving (EOControl)
Package:
com.webobjects.eointerface


Class Description


An EOMasterPeerAssociation binds two EODisplayGroups together in a master-detail relationship, where the detail EODisplayGroup shows the destination objects for the relationship of the master EODisplayGroup.

In a master-peer arrangement, the detail display group's data source is independent. Detail objects are fetched independently from the detail's data source, which means that changes to one display group aren't automatically reflected in the other. To update the other display group, it's necessary to save the changes made and then have the other display group fetch its objects anew.

Contrast this with a master-detail setup using an EOMasterDetailAssociation. With an EOMasterDetailAssociation, the display groups' data sources also operate in a master-detail arrangement, meaning changes to one are immediately reflected in the other. The detail objects are taken directly from the selected object in the master display group, so that changes to the objects in one display group are instantly reflected in the other. Master-peer setups display these advantages over master-detail setups:

Generally, master-peer setups are only appropriate when no insertions or deletions will be made in the detail display group. For a master-detail relationship that reflects changes between two display groups, including insertions and deletions, use an EOMasterDetailAssociation.


Usable With
EODisplayGroups whose data sources are not EODetailDataSources


Aspects
parent A relationship from the master EODisplayGroup.


Object Keys Taken
None


Example

Suppose you have a database of salesmen and their associated sales. Each salesman has a city ID. The sales are related to the salesmen by salesman ID, but also have a city ID. You want a list of all the sales in a salesman's city so you could evaluate it against other salesmen. For this, you create a relationship between salesman and sales based on city ID (the relationship is not a class property). You can then display that information using an EOMasterPeerAssociation.




Interfaces Implemented


NSDisposable
EOObserving


Method Types


All methods
EOMasterPeerAssociation
isUsableWithObject


Constructors



EOMasterPeerAssociation

public EOMasterPeerAssociation(Object anObject)

Description forthcoming.


Instance Methods



isUsableWithObject

public boolean isUsableWithObject(Object anObject)

Description forthcoming.

© 2001 Apple Computer, Inc. (Last Published April 21, 2001)


Table of Contents