org.eobjects.metamodel.schema
Class AbstractRelationship

java.lang.Object
  extended by org.eobjects.metamodel.util.BaseObject
      extended by org.eobjects.metamodel.schema.AbstractRelationship
All Implemented Interfaces:
Serializable, Comparable<Relationship>, Relationship
Direct Known Subclasses:
ImmutableRelationship, MutableRelationship

public abstract class AbstractRelationship
extends BaseObject
implements Relationship

See Also:
Serialized Form

Constructor Summary
AbstractRelationship()
           
 
Method Summary
protected static Table checkSameTable(Column[] columns)
           
protected  boolean classEquals(BaseObject obj)
          Override this method if the equals method should support different subtypes.
 int compareTo(Relationship that)
           
 boolean containsColumnPair(Column pkColumn, Column fkColumn)
          Determines whether this relationship contains a specific pair of columns
protected  void decorateIdentity(List<Object> identifiers)
          Subclasses should implement this method and add all fields to the list that are to be included in equals(...) and hashCode() evaluation
 Table getForeignTable()
          Gets the table of the foreign key column(s).
 Table getPrimaryTable()
          Gets the table of the primary key column(s).
 String toString()
           
 
Methods inherited from class org.eobjects.metamodel.util.BaseObject
equals, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eobjects.metamodel.schema.Relationship
getForeignColumns, getPrimaryColumns
 

Constructor Detail

AbstractRelationship

public AbstractRelationship()
Method Detail

checkSameTable

protected static Table checkSameTable(Column[] columns)

getForeignTable

public Table getForeignTable()
Description copied from interface: Relationship
Gets the table of the foreign key column(s).

Specified by:
getForeignTable in interface Relationship
Returns:
the table of the foreign key column(s).

getPrimaryTable

public Table getPrimaryTable()
Description copied from interface: Relationship
Gets the table of the primary key column(s).

Specified by:
getPrimaryTable in interface Relationship
Returns:
the table of the primary key column(s).

toString

public String toString()
Overrides:
toString in class BaseObject

compareTo

public int compareTo(Relationship that)
Specified by:
compareTo in interface Comparable<Relationship>

decorateIdentity

protected final void decorateIdentity(List<Object> identifiers)
Description copied from class: BaseObject
Subclasses should implement this method and add all fields to the list that are to be included in equals(...) and hashCode() evaluation

Specified by:
decorateIdentity in class BaseObject

classEquals

protected final boolean classEquals(BaseObject obj)
Description copied from class: BaseObject
Override this method if the equals method should support different subtypes. For example, if different subtypes of Number should be supported, implement this method with: obj instanceof Number and make sure that the decorateIdentity(...) method will always return a comparable list of identity-objects.

Overrides:
classEquals in class BaseObject
Returns:
true if the provided object's class is accepted for equals comparison

containsColumnPair

public boolean containsColumnPair(Column pkColumn,
                                  Column fkColumn)
Description copied from interface: Relationship
Determines whether this relationship contains a specific pair of columns

Specified by:
containsColumnPair in interface Relationship
Parameters:
pkColumn - primary key column
fkColumn - foreign key column
Returns:
true if this relation contains the specified primary and foreign columns as a part of the relation


Copyright © 2007-2013. All Rights Reserved.