|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.alfresco.util.schemacomp.model.AbstractDbObject
org.alfresco.util.schemacomp.model.Column
public class Column
Represents a column in a database table.
| Field Summary |
|---|
| Fields inherited from class org.alfresco.util.schemacomp.model.AbstractDbObject |
|---|
comparisonUtils |
| Constructor Summary | |
|---|---|
Column(java.lang.String name)
|
|
Column(Table table,
java.lang.String name,
java.lang.String type,
boolean nullable)
Construct a Column. |
|
| 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)
|
int |
getOrder()
|
java.lang.String |
getType()
|
int |
hashCode()
|
boolean |
isAutoIncrement()
|
boolean |
isNullable()
|
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 |
setAutoIncrement(boolean autoIncrement)
|
void |
setNullable(boolean nullable)
|
void |
setOrder(int order)
|
void |
setType(java.lang.String type)
|
| Methods inherited from class org.alfresco.util.schemacomp.model.AbstractDbObject |
|---|
diff, getName, getNameStrength, getParent, getTypeName, getValidators, setComparisonUtils, setName, setNameStrength, setParent, setValidators, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Column(java.lang.String name)
public Column(Table table,
java.lang.String name,
java.lang.String type,
boolean nullable)
name - type - nullable - | Method Detail |
|---|
public java.lang.String getType()
public void setType(java.lang.String type)
type - the type to setpublic boolean isNullable()
public void setNullable(boolean nullable)
nullable - the nullable to setpublic int getOrder()
public void setOrder(int order)
order - the order to setpublic boolean isAutoIncrement()
public void setAutoIncrement(boolean autoIncrement)
autoIncrement - whether this column has the auto-increment flag set.public int hashCode()
hashCode in class AbstractDbObjectpublic boolean equals(java.lang.Object obj)
equals in class AbstractDbObject
protected void doDiff(DbObject right,
DiffContext ctx,
Result.Strength strength)
AbstractDbObject
doDiff in class AbstractDbObjectpublic void accept(DbObjectVisitor visitor)
DbObject
public 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 AbstractDbObject
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||