This class models a container-managed relation. A Relation maintains three views: a DefaultMutableTreeNode,
an XML view and a Swing JPanel. Unfortunately this class is kind of a Model, View and Controller rolled into one,
but that's just the way JagBeans have been designed...
The relation data is initially generated using foreign key information read from a database table (or just
filled in by hand from the GUI).
author: Michael O'Connor - Finalist IT Group
Constructor Summary
public
Relation(Entity localEntity) Constructs a new Relation from scratch.
isManyToManyRelation() The relation is a many to many relation if the related entity is an assocation table.
string with 'true' if the relation is a many to many relation.
public boolean
isTargetMultiple() Gets 'targetMultiple' : whether or not this relation maps to multiple entities at the 'foreign' end.
notifyLocalEntityIsComplete() RelationPanels can't finish initialising themselves until the local-side entity is completely generated
(until all the entity's fields are generated).
Constructs a Relation from a ForeignKey object.
Parameters: localEntity - the parent entity bean on the local side of this relation. Parameters: fk - the foreign key.
Constructs a Relation from a ForeignKey object.
Parameters: localEntity - the parent entity bean on the local side of this relation. Parameters: fk - the foreign key. Parameters: waitForInitSignal - if true panel delays initialisation until notified.
(Re-)Constructs a Relation from an XML element.
Parameters: localEntity - the parent entity bean on the local side of this relation. Parameters: el - the XML element.
Creates the XML view of this relation and appends it as a new child to the specified XML element.
Parameters: parent - the XML element to become parent to this relation child.
The relation is a many to many relation if the related entity is an assocation table.
string with 'true' if the relation is a many to many relation. 'false' if not.
RelationPanels can't finish initialising themselves until the local-side entity is completely generated
(until all the entity's fields are generated). Call this method to wake up the sleeping initialisers.
setBidirectional
public void setBidirectional(boolean bidirectional)(Code)