public class ForeignKey extends AbstractDbObject
localColumn) that references
targetTable.targetColumncomparisonUtils| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(DbObjectVisitor visitor)
Allows a visitor to be invoked against this DbObject.
|
protected void |
doDiff(DbObject right,
DiffContext ctx)
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() |
boolean |
sameAs(DbObject other)
Are the two
DbObjects logically the same? For example two Index objects may have
different names, but are the same index as they both index the same columns for the same table. |
void |
setLocalColumn(java.lang.String localColumn) |
void |
setTargetColumn(java.lang.String targetColumn) |
void |
setTargetTable(java.lang.String targetTable) |
diff, getName, getParent, getValidators, hasObjectLevelValidator, hasValidators, setComparisonUtils, setName, setParent, setValidators, toStringpublic ForeignKey(java.lang.String name)
public ForeignKey(Table table, java.lang.String fkName, java.lang.String localColumn, java.lang.String targetTable, java.lang.String targetColumn)
table - the parent tablefkName - localColumn - targetTable - targetColumn - public java.lang.String getLocalColumn()
public void setLocalColumn(java.lang.String localColumn)
localColumn - the localColumn to setpublic java.lang.String getTargetTable()
public void setTargetTable(java.lang.String targetTable)
targetTable - the targetTable to setpublic java.lang.String getTargetColumn()
public void setTargetColumn(java.lang.String targetColumn)
targetColumn - the targetColumn to setpublic int hashCode()
hashCode in class AbstractDbObjectpublic boolean equals(java.lang.Object obj)
equals in class AbstractDbObjectprotected void doDiff(DbObject right, DiffContext ctx)
AbstractDbObjectdoDiff in class AbstractDbObjectpublic void accept(DbObjectVisitor visitor)
DbObjectpublic java.lang.String getTypeName()
DbObjectgetTypeName in interface DbObjectgetTypeName in class AbstractDbObjectpublic boolean sameAs(DbObject other)
DbObjectDbObjects logically the same? For example two Index objects may have
different names, but are the same index as they both index the same columns for the same table.
If two objects a and b have the same logical identity, it does not mean that a.equals(b) == true.
The two objects may well have differences and will be flagged as such by the schema comparison tool. When
a.sameAs(b) == true it makes it easier to show the differences as related, i.e. a and b are
different rather than, a is only in the 'left' tree and b is only in the 'right' tree.
sameAs in interface DbObjectsameAs in class AbstractDbObjectCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.