Class Table
java.lang.Object
org.alfresco.util.schemacomp.model.AbstractDbObject
org.alfresco.util.schemacomp.model.Table
- All Implemented Interfaces:
DbObject
Instances of this class represent a database table.
- Author:
- Matt Ward
-
Field Summary
Fields inherited from class org.alfresco.util.schemacomp.model.AbstractDbObject
comparisonUtils -
Constructor Summary
ConstructorsConstructorDescriptionTable(String name, Collection<Column> columns, PrimaryKey primaryKey, Collection<ForeignKey> foreignKeys, Collection<Index> indexes) Table(Schema parentSchema, String name, Collection<Column> columns, PrimaryKey primaryKey, Collection<ForeignKey> foreignKeys, Collection<Index> indexes) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(DbObjectVisitor visitor) Allows a visitor to be invoked against this DbObject.protected voiddoDiff(DbObject other, DiffContext ctx) Override this method to provide subclass specific diffing logic.booleaninthashCode()booleanvoidsetColumns(Collection<Column> columns) voidsetForeignKeys(Collection<ForeignKey> foreignKeys) voidsetIndexes(Collection<Index> indexes) voidsetPrimaryKey(PrimaryKey primaryKey) Methods inherited from class org.alfresco.util.schemacomp.model.AbstractDbObject
diff, getName, getParent, getTypeName, getValidators, hasObjectLevelValidator, hasValidators, sameAs, setComparisonUtils, setName, setParent, setValidators, toString
-
Constructor Details
-
Table
-
Table
public Table(String name, Collection<Column> columns, PrimaryKey primaryKey, Collection<ForeignKey> foreignKeys, Collection<Index> indexes) -
Table
public Table(Schema parentSchema, String name, Collection<Column> columns, PrimaryKey primaryKey, Collection<ForeignKey> foreignKeys, Collection<Index> indexes)
-
-
Method Details
-
getColumns
- Returns:
- the columns
-
setColumns
- Parameters:
columns- the columns to set
-
getPrimaryKey
- Returns:
- the primaryKey
-
hasPrimaryKey
public boolean hasPrimaryKey()- Returns:
- Whether there is a primary key on this table.
-
setPrimaryKey
- Parameters:
primaryKey- the primaryKey to set
-
getForeignKeys
- Returns:
- the foreignKeys
-
setForeignKeys
- Parameters:
foreignKeys- the foreignKeys to set
-
getIndexes
- Returns:
- the indexes
-
setIndexes
- Parameters:
indexes- the indexes to set
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractDbObject
-
equals
- Overrides:
equalsin classAbstractDbObject
-
doDiff
Description copied from class:AbstractDbObjectOverride this method to provide subclass specific diffing logic.- Overrides:
doDiffin classAbstractDbObject- Parameters:
other- DbObjectctx- DiffContext
-
accept
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
-