Class Column
- java.lang.Object
-
- org.alfresco.util.schemacomp.model.AbstractDbObject
-
- org.alfresco.util.schemacomp.model.Column
-
- All Implemented Interfaces:
DbObject
public class Column extends AbstractDbObject
Represents a column in a database table.- Author:
- Matt Ward
-
-
Field Summary
-
Fields inherited from class org.alfresco.util.schemacomp.model.AbstractDbObject
comparisonUtils
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(DbObjectVisitor visitor)Allows a visitor to be invoked against this DbObject.protected voiddoDiff(DbObject right, DiffContext ctx)Override this method to provide subclass specific diffing logic.booleanequals(java.lang.Object obj)intgetOrder()java.lang.StringgetType()inthashCode()booleanisAutoIncrement()booleanisCompareOrder()booleanisNullable()voidsetAutoIncrement(boolean autoIncrement)voidsetCompareOrder(boolean compareOrder)voidsetNullable(boolean nullable)voidsetOrder(int order)voidsetType(java.lang.String type)-
Methods inherited from class org.alfresco.util.schemacomp.model.AbstractDbObject
diff, getName, getParent, getTypeName, getValidators, hasObjectLevelValidator, hasValidators, sameAs, setComparisonUtils, setName, setParent, setValidators, toString
-
-
-
-
Constructor Detail
-
Column
public Column(java.lang.String name)
-
Column
public Column(Table table, java.lang.String name, java.lang.String type, boolean nullable)
Construct a Column.- Parameters:
table- the parent tablename- Stringtype- Stringnullable- boolean
-
-
Method Detail
-
getType
public java.lang.String getType()
- Returns:
- the type
-
setType
public void setType(java.lang.String type)
- Parameters:
type- the type to set
-
isNullable
public boolean isNullable()
- Returns:
- the nullable
-
setNullable
public void setNullable(boolean nullable)
- Parameters:
nullable- the nullable to set
-
getOrder
public int getOrder()
- Returns:
- the order
-
setOrder
public void setOrder(int order)
- Parameters:
order- the order to set
-
isAutoIncrement
public boolean isAutoIncrement()
- Returns:
- whether the column has an auto-increment flag set.
-
setAutoIncrement
public void setAutoIncrement(boolean autoIncrement)
- Parameters:
autoIncrement- whether this column has the auto-increment flag set.
-
isCompareOrder
public boolean isCompareOrder()
- Returns:
- the compareOrder
-
setCompareOrder
public void setCompareOrder(boolean compareOrder)
- Parameters:
compareOrder- the compareOrder to set
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractDbObject
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classAbstractDbObject
-
doDiff
protected void doDiff(DbObject right, DiffContext ctx)
Description copied from class:AbstractDbObjectOverride this method to provide subclass specific diffing logic.- Overrides:
doDiffin classAbstractDbObject- Parameters:
right- DbObjectctx- DiffContext
-
accept
public void accept(DbObjectVisitor visitor)
Description copied from interface:DbObjectAllows 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.- Parameters:
visitor- DbObjectVisitor
-
-