public class ForeignKey extends AbstractDbObject
localColumn
) that references
targetTable.targetColumn
comparisonUtils
Constructor and Description |
---|
ForeignKey(String name) |
ForeignKey(Table table,
String fkName,
String localColumn,
String targetTable,
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(Object obj) |
String |
getLocalColumn() |
String |
getTargetColumn() |
String |
getTargetTable() |
String |
getTypeName()
Type name, e.g.
|
int |
hashCode() |
boolean |
sameAs(DbObject other)
Are the two
DbObject s 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(String localColumn) |
void |
setTargetColumn(String targetColumn) |
void |
setTargetTable(String targetTable) |
diff, getName, getParent, getValidators, hasObjectLevelValidator, hasValidators, setComparisonUtils, setName, setParent, setValidators, toString
public ForeignKey(String name)
public String getLocalColumn()
public void setLocalColumn(String localColumn)
localColumn
- the localColumn to setpublic String getTargetTable()
public void setTargetTable(String targetTable)
targetTable
- the targetTable to setpublic String getTargetColumn()
public void setTargetColumn(String targetColumn)
targetColumn
- the targetColumn to setpublic int hashCode()
hashCode
in class AbstractDbObject
public boolean equals(Object obj)
equals
in class AbstractDbObject
protected void doDiff(DbObject right, DiffContext ctx)
AbstractDbObject
doDiff
in class AbstractDbObject
right
- DbObjectctx
- DiffContextpublic void accept(DbObjectVisitor visitor)
DbObject
visitor
- DbObjectVisitorpublic String getTypeName()
DbObject
getTypeName
in interface DbObject
getTypeName
in class AbstractDbObject
public boolean sameAs(DbObject other)
DbObject
DbObject
s 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 DbObject
sameAs
in class AbstractDbObject
other
- DbObjectCopyright © 2005–2017 Alfresco Software. All rights reserved.