public class Index extends AbstractDbObject
comparisonUtils| Constructor and Description |
|---|
Index(java.lang.String name) |
Index(Table table,
java.lang.String name,
java.util.List columnNames) |
| 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.util.List |
getColumnNames() |
int |
hashCode() |
boolean |
isUnique()
Does this index have the unique attribute?
|
boolean |
sameAs(DbObject o)
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 |
setColumnNames(java.util.List columnNames) |
void |
setUnique(boolean unique) |
diff, getName, getParent, getTypeName, getValidators, hasObjectLevelValidator, hasValidators, setComparisonUtils, setName, setParent, setValidators, toStringpublic Index(java.lang.String name)
public Index(Table table, java.lang.String name, java.util.List columnNames)
table - the parent tablecolumnNames - public java.util.List getColumnNames()
public void setColumnNames(java.util.List columnNames)
columnNames - the columnNames to setpublic boolean isUnique()
public void setUnique(boolean unique)
unique - Index.isUnique()public int hashCode()
hashCode in class AbstractDbObjectpublic boolean equals(java.lang.Object obj)
equals in class AbstractDbObjectpublic boolean sameAs(DbObject o)
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 AbstractDbObjectprotected void doDiff(DbObject right, DiffContext ctx)
AbstractDbObjectdoDiff in class AbstractDbObjectpublic void accept(DbObjectVisitor visitor)
DbObjectCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.