WebObjects 5.2

com.webobjects.eoaccess
Class EOJoin

java.lang.Object
  |
  +--com.webobjects.eoaccess.EOJoin

public class EOJoin
extends Object

An EOJoin describes one source-destination attribute pair for an EORelationship.

See Also:
EORelationship

Constructor Summary
EOJoin(EOAttribute source, EOAttribute destination)
          Creates and returns a new EOJoin with the given source and destination attributes.
 
Method Summary
 Object clone()
          Returns a reference to the receiver.
 EOAttribute destinationAttribute()
          Returns the destination ("right") attribute of the receiver.
 boolean equals(Object object)
          Compares object with the receiver and returns true if they are identical, false otherwise.
 boolean isReciprocalToJoin(EOJoin otherJoin)
          Returns true if the receiver's source attribute is identical to otherJoin's destination attribute, and otherJoin's source attribute is equal to the receiver's destination attribute; returns false otherwise.
 EOAttribute sourceAttribute()
          Returns the source ("left") attribute of the receiver.
 String toString()
          Returns a string representation of the receiver.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EOJoin

public EOJoin(EOAttribute source,
              EOAttribute destination)
Creates and returns a new EOJoin with the given source and destination attributes. See the EORelationship class documentation for an example of creating a relationship using EOJoins.
Parameters:
source - The source attribute for the new EOJoin.
destination - The destination attribute for the new EOJoin.
See Also:
EORelationship, EORelationship.addJoin(EOJoin aJoin)
Method Detail

clone

public Object clone()
Returns a reference to the receiver. As EOJoin objects are immutable, it is not necessary to make a copy.
Overrides:
clone in class Object
Returns:
A reference to the receiver.

destinationAttribute

public EOAttribute destinationAttribute()
Returns the destination ("right") attribute of the receiver.
Returns:
The destination attribute of the receiver.
See Also:
EORelationship.destinationAttributes()

equals

public boolean equals(Object object)
Compares object with the receiver and returns true if they are identical, false otherwise.
Overrides:
equals in class Object
Parameters:
object - An object to be compared with the receiver.
Returns:
true if object and the receiver are identical.

isReciprocalToJoin

public boolean isReciprocalToJoin(EOJoin otherJoin)
Returns true if the receiver's source attribute is identical to otherJoin's destination attribute, and otherJoin's source attribute is equal to the receiver's destination attribute; returns false otherwise. This type of join is known as a back-referencing join.
Parameters:
otherJoin - An EOJoin object to compare with the receiver.
Returns:
true if otherJoin is a back-referencing join relative to the receiver.
See Also:
EORelationship.inverseRelationship()

sourceAttribute

public EOAttribute sourceAttribute()
Returns the source ("left") attribute of the receiver.
Returns:
The source attribute of the receiver.
See Also:
EORelationship.sourceAttributes()

toString

public String toString()
Returns a string representation of the receiver.
Overrides:
toString in class Object
Returns:
A string representation of the receiver.

Last updated Fri Feb 21 13:15:00 PST 2003.

Copyright © 2003 Apple Computer, Inc.