ca.sqlpower.architect
Class SQLRelationship.RelationshipManager

java.lang.Object
  extended by ca.sqlpower.architect.SQLRelationship.RelationshipManager
All Implemented Interfaces:
SQLObjectListener
Enclosing class:
SQLRelationship

protected class SQLRelationship.RelationshipManager
extends java.lang.Object
implements SQLObjectListener

Listens to all activity at and under the pkTable and fkTable. Updates and maintains the mapping from pkTable to fkTable, and even removes the whole relationship when necessary.


Constructor Summary
protected SQLRelationship.RelationshipManager()
           
 
Method Summary
 void dbChildrenInserted(SQLObjectEvent e)
           
 void dbChildrenRemoved(SQLObjectEvent e)
           
 void dbObjectChanged(SQLObjectEvent e)
           
 void dbStructureChanged(SQLObjectEvent e)
           
protected  void ensureInMapping(SQLColumn pkcol)
           
protected  void ensureNotInMapping(SQLColumn pkcol)
          Ensures there is no mapping for pkcol in this relationship.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SQLRelationship.RelationshipManager

protected SQLRelationship.RelationshipManager()
Method Detail

dbChildrenInserted

public void dbChildrenInserted(SQLObjectEvent e)
Specified by:
dbChildrenInserted in interface SQLObjectListener

dbChildrenRemoved

public void dbChildrenRemoved(SQLObjectEvent e)
Specified by:
dbChildrenRemoved in interface SQLObjectListener

dbObjectChanged

public void dbObjectChanged(SQLObjectEvent e)
Specified by:
dbObjectChanged in interface SQLObjectListener

dbStructureChanged

public void dbStructureChanged(SQLObjectEvent e)
Specified by:
dbStructureChanged in interface SQLObjectListener

ensureInMapping

protected void ensureInMapping(SQLColumn pkcol)
                        throws ArchitectException
Throws:
ArchitectException

ensureNotInMapping

protected void ensureNotInMapping(SQLColumn pkcol)
                           throws ArchitectException
Ensures there is no mapping for pkcol in this relationship. If there was, it is removed along with the column that may have been pushed into the relationship's fkTable.

Throws:
ArchitectException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2003-2007 SQL Power Group Inc. www.sqlpower.ca