ca.sqlpower.architect.swingui
Class ColumnMappingPanel

java.lang.Object
  extended by ca.sqlpower.architect.swingui.ColumnMappingPanel
All Implemented Interfaces:
ca.sqlpower.swingui.DataEntryPanel

public class ColumnMappingPanel
extends java.lang.Object
implements ca.sqlpower.swingui.DataEntryPanel

The ColumnMappingPanel presents a GUI for viewing and modifying the column mappings between two tables. The data model for this panel is a SQLRelationship, and its ColumnMapping children represent the individual mappings from one column to the other. Don't let this fool you into thinking the ColumnMappingPanel can only be used to edit FK relationship mappings, though! You can make a new Relationship, throw it at this editor, then examine its mappings to build up any kind of mapping you want.


Constructor Summary
ColumnMappingPanel(ArchitectSwingSession session, SQLRelationship r)
           
 
Method Summary
 boolean applyChanges()
           
 void discardChanges()
           
 javax.swing.JComponent getPanel()
           
 boolean hasUnsavedChanges()
           
 void updateMappingsFromRelationship()
          Updates this panel's internal representation of the mappings to match those in r.
 void updateRelationshipFromMappings()
          Updates the ColumnMapping children in r to match those in this panel's internal representation of the mappings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColumnMappingPanel

public ColumnMappingPanel(ArchitectSwingSession session,
                          SQLRelationship r)
Method Detail

updateRelationshipFromMappings

public void updateRelationshipFromMappings()
                                    throws ArchitectException
Updates the ColumnMapping children in r to match those in this panel's internal representation of the mappings.

Throws:
ArchitectException

updateMappingsFromRelationship

public void updateMappingsFromRelationship()
Updates this panel's internal representation of the mappings to match those in r.


applyChanges

public boolean applyChanges()
Specified by:
applyChanges in interface ca.sqlpower.swingui.DataEntryPanel

discardChanges

public void discardChanges()
Specified by:
discardChanges in interface ca.sqlpower.swingui.DataEntryPanel

getPanel

public javax.swing.JComponent getPanel()
Specified by:
getPanel in interface ca.sqlpower.swingui.DataEntryPanel

hasUnsavedChanges

public boolean hasUnsavedChanges()
Specified by:
hasUnsavedChanges in interface ca.sqlpower.swingui.DataEntryPanel


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