org.alfresco.util.schemacomp.model
Class ForeignKey

java.lang.Object
  extended by org.alfresco.util.schemacomp.model.AbstractDbObject
      extended by org.alfresco.util.schemacomp.model.ForeignKey
All Implemented Interfaces:
DbObject

public class ForeignKey
extends AbstractDbObject

Represents a foreign key on a database table (localColumn) that references targetTable.targetColumn


Field Summary
 
Fields inherited from class org.alfresco.util.schemacomp.model.AbstractDbObject
comparisonUtils
 
Constructor Summary
ForeignKey(java.lang.String name)
           
ForeignKey(Table table, java.lang.String fkName, java.lang.String localColumn, java.lang.String targetTable, java.lang.String targetColumn)
          Constructor.
 
Method Summary
 void accept(DbObjectVisitor visitor)
          Allows a visitor to be invoked against this DbObject.
protected  void doDiff(DbObject right, DiffContext ctx, Result.Strength strength)
          Override this method to provide subclass specific diffing logic.
 boolean equals(java.lang.Object obj)
           
 java.lang.String getLocalColumn()
           
 java.lang.String getTargetColumn()
           
 java.lang.String getTargetTable()
           
 java.lang.String getTypeName()
          Type name, e.g.
 int hashCode()
           
 void setLocalColumn(java.lang.String localColumn)
           
 void setTargetColumn(java.lang.String targetColumn)
           
 void setTargetTable(java.lang.String targetTable)
           
 
Methods inherited from class org.alfresco.util.schemacomp.model.AbstractDbObject
diff, getName, getNameStrength, getParent, getValidators, sameAs, setComparisonUtils, setName, setNameStrength, setParent, setValidators, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ForeignKey

public ForeignKey(java.lang.String name)

ForeignKey

public ForeignKey(Table table,
                  java.lang.String fkName,
                  java.lang.String localColumn,
                  java.lang.String targetTable,
                  java.lang.String targetColumn)
Constructor.

Parameters:
table - the parent table
fkName -
localColumn -
targetTable -
targetColumn -
Method Detail

getLocalColumn

public java.lang.String getLocalColumn()
Returns:
the localColumn

setLocalColumn

public void setLocalColumn(java.lang.String localColumn)
Parameters:
localColumn - the localColumn to set

getTargetTable

public java.lang.String getTargetTable()
Returns:
the targetTable

setTargetTable

public void setTargetTable(java.lang.String targetTable)
Parameters:
targetTable - the targetTable to set

getTargetColumn

public java.lang.String getTargetColumn()
Returns:
the targetColumn

setTargetColumn

public void setTargetColumn(java.lang.String targetColumn)
Parameters:
targetColumn - the targetColumn to set

hashCode

public int hashCode()
Overrides:
hashCode in class AbstractDbObject

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class AbstractDbObject

doDiff

protected void doDiff(DbObject right,
                      DiffContext ctx,
                      Result.Strength strength)
Description copied from class: AbstractDbObject
Override this method to provide subclass specific diffing logic.

Overrides:
doDiff in class AbstractDbObject

accept

public void accept(DbObjectVisitor visitor)
Description copied from interface: DbObject
Allows a visitor to be invoked against this DbObject. Implementations should ensure that child objects are visited first (by calling accept on them) before invoking the visitor on itself.


getTypeName

public java.lang.String getTypeName()
Description copied from interface: DbObject
Type name, e.g. "column", "foreign key"

Specified by:
getTypeName in interface DbObject
Overrides:
getTypeName in class AbstractDbObject
Returns:
String


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.